[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    [Differential] [Commented On] D3479: [libinput] Add more support for touchpads in preparation for th
From:       "davidedmundson (David Edmundson)" <noreply () phabricator ! kde ! org>
Date:       2016-11-30 16:53:03
Message-ID: 20161130165303.30738.87006.C8E36A25 () phabricator ! kde ! org
[Download RAW message or body]

davidedmundson added a comment.


  To expand on the DBus problem:
  
  The connection object resides in a thread; but emits stuff from the main thread. 
  DBus is generally thread safe, but QDBusAbstractAdaptor uses sender() in relaying \
so isn't.  
  add in a bouncer, things work nicely:
  
    connect(this, &Connection::deviceRemoved, this, [this](Device* device) {
              emit deviceRemovedSysName(device->sysName());
      });   
  
  this gets implicitly queuedconnection as this is emitted in another thread and it \
all works. Huzzah  
  However, we still get a tonne of warnings because we're emitting a bunch of other \
signals, and internally in QDBusAbstractAdaptor we have the warning about checking \
for threads*before* we see if actually relays the signal.  
  The only solution I can see is to make an explicit adaptor.
  
  (or we change the KCM side to use org.freedesktop.DBus.ObjectManager and forget \
putting anything in here)

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D3479

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: subdiff, #kwin, #plasma, davidedmundson
Cc: graesslin, davidedmundson, plasma-devel, kwin, #kwin, lesliezhai, ali-mohamed, \
jensreuterberg, abetts, sebas


[Attachment #3 (text/html)]

<table><tr><td style="">davidedmundson added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D3479" rel="noreferrer">View \
Revision</a></tr></table><br /><div><div><p>To expand on the DBus problem:</p>

<p>The connection object resides in a thread; but emits stuff from the main thread. \
<br /> DBus is generally thread safe, but QDBusAbstractAdaptor uses sender() in \
relaying so isn&#039;t.</p>

<p>add in a bouncer, things work nicely:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" \
data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, 0.08);">connect(this, \
&amp;Connection::deviceRemoved, this, [this](Device* device) {  emit \
deviceRemovedSysName(device-&gt;sysName());  });</pre></div>

<p>this gets implicitly queuedconnection as this is emitted in another thread and it \
all works. Huzzah</p>

<p>However, we still get a tonne of warnings because we&#039;re emitting a bunch of \
other signals, and internally in QDBusAbstractAdaptor we have the warning about \
checking for threads*before* we see if actually relays the signal.</p>

<p>The only solution I can see is to make an explicit adaptor.</p>

<p>(or we change the KCM side to use org.freedesktop.DBus.ObjectManager and forget \
putting anything in here)</p></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D3479" \
rel="noreferrer">https://phabricator.kde.org/D3479</a></div></div><br \
/><div><strong>EMAIL PREFERENCES</strong><div><a \
href="https://phabricator.kde.org/settings/panel/emailpreferences/" \
rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br \
/><div><strong>To: </strong>subdiff, KWin, Plasma, davidedmundson<br /><strong>Cc: \
</strong>graesslin, davidedmundson, plasma-devel, kwin, KWin, lesliezhai, \
ali-mohamed, jensreuterberg, abetts, sebas<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic