<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/D3480" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>looks good to me too.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D3480#inline-13656" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">colorpicker.cpp:56</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span style="color: #aa2211">:</span> <span class="n">m_replyConnection</span><span class="p">(</span><span class="n">QDBusConnection</span><span style="color: #aa2211">::</span><span class="n">sessionBus</span><span class="p">())</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="p">,</span> <span class="n">m_scheduledPosition</span><span class="p">(</span><span class="n">QPoint</span><span class="p">(</span><span style="color: #aa2211">-</span><span style="color: #601200">1</span><span class="p">,</span> <span style="color: #aa2211">-</span><span style="color: #601200">1</span><span class="p">))</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">KWin has a lovely class ClearablePoint for doing exactly this</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D3480#inline-13652" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">colorpicker.cpp:64</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">QDBusConnection</span><span style="color: #aa2211">::</span><span class="n">sessionBus</span><span class="p">().</span><span class="n">unregisterObject</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"/ColorPicker"</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">FWIW, this line isn't needed</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D3480#inline-13655" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">colorpicker.cpp:84</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        <span style="color: #aa4000">const</span> <span class="n">QRect</span> <span class="n">geo</span> <span style="color: #aa2211">=</span> <span class="n">GLRenderTarget</span><span style="color: #aa2211">::</span><span class="n">virtualScreenGeometry</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        <span class="n">glReadnPixels</span><span class="p">(</span><span class="n">m_scheduledPosition</span><span class="p">.</span><span class="n">x</span><span class="p">()</span> <span style="color: #aa2211">-</span> <span class="n">geo</span><span class="p">.</span><span class="n">x</span><span class="p">(),</span> <span class="n">geo</span><span class="p">.</span><span class="n">height</span><span class="p">()</span> <span style="color: #aa2211">-</span> <span class="n">geo</span><span class="p">.</span><span class="n">y</span><span class="p">()</span> <span style="color: #aa2211">-</span> <span class="n">m_scheduledPosition</span><span class="p">.</span><span class="n">y</span><span class="p">(),</span> <span style="color: #601200">1</span><span class="p">,</span> <span style="color: #601200">1</span><span class="p">,</span> <span class="n">GL_RGB</span><span class="p">,</span> <span class="n">GL_UNSIGNED_BYTE</span><span class="p">,</span> <span style="color: #601200">3</span><span class="p">,</span> <span class="n">data</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        <span class="n">m_replyConnection</span><span class="p">.</span><span class="n">send</span><span class="p">(</span><span class="n">m_replyMessage</span><span class="p">.</span><span class="n">createReply</span><span class="p">(</span><span class="n">QColor</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">],</span> <span class="n">data</span><span class="p">[</span><span style="color: #601200">1</span><span class="p">],</span> <span class="n">data</span><span class="p">[</span><span style="color: #601200">2</span><span class="p">])));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">FWIW (though not worth changing it) if you're going to have n=1 you can use glReadPixels</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D3480#inline-13653" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">colorpicker.cpp:101</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">m_picking</span> <span style="color: #aa2211">=</span> <span style="color: #304a96">true</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">m_replyConnection</span> <span style="color: #aa2211">=</span> <span class="n">connection</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">    <span class="n">m_replyMessage</span> <span style="color: #aa2211">=</span> <span class="n">message</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">there's not a lot of point doing this, you know what connection it is as you only register this on the session bus (line 59)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D3480#inline-13654" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">colorpicker.cpp:110</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">                <span style="color: #74777d">// error condition</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">                <span class="n">m_replyConnection</span><span class="p">.</span><span class="n">send</span><span class="p">(</span><span class="n">m_replyMessage</span><span class="p">.</span><span class="n">createErrorReply</span><span class="p">(</span><span class="n">QDBusError</span><span style="color: #aa2211">::</span><span class="n">Failed</span><span class="p">,</span> <span style="color: #766510">"Color picking got cancelled"</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">                <span class="n">m_picking</span> <span style="color: #aa2211">=</span> <span style="color: #304a96">false</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">DBus error messages have two parts:</p>

<p style="padding: 0; margin: 8px;">a computer readable name, and a human readable stirng.</p>

<p style="padding: 0; margin: 8px;">You want to supply a better name than "org.freedesktop.DBus.Error.Failed" (which is what this expands to) so that spectacle can tell the difference between failed and cancelled without parsing strings meant for humans.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D3480#inline-13636" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">graesslin</span> wrote in <span style="color: #4b4d51; font-weight: bold;">colorpicker.h:37</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">No, he complained about different services. Different interface was fine.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Just to chime in, mgraesslin is right.</p>

<p style="padding: 0; margin: 8px;">A different interface is very sensible as apparmor and selinux (and in turn snappy) can filter on interfaces.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKWIN KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>color-picker-effect</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3480" rel="noreferrer">https://phabricator.kde.org/D3480</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>graesslin, KWin, Plasma on Wayland, broulik<br /><strong>Cc: </strong>davidedmundson, plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas<br /></div>