[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Fix KWindowSystem::compositingChanged signal
From: Thomas_Lübking <thomas.luebking () gmail ! com>
Date: 2013-01-09 1:57:45
Message-ID: 20130109015745.23072.72786 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Jan. 9, 2013, 1:38 a.m., Xuetian Weng wrote:
> > kdeui/windowmanagement/kwindowsystem_x11.cpp, line 168
> > <http://git.reviewboard.kde.org/r/107983/diff/4/?file=106081#file106081line168>
> >
> > I don't quite get why this part is required. Since KWindowSystem already calls \
> > SelectSelectionInput in constructor, just use the above one and do window == \
> > winId and event->selection == net_wm_cm is enough.
It's required because it is the central aspect about the workaround.
The problem is that the code as present uses the XFixesSelectSelection to get the \
event on winId but because of the compressing behavior in Qt, it's usually lost. \
That's the root of bug #179042.
> On Jan. 9, 2013, 1:38 a.m., Xuetian Weng wrote:
> > kdeui/windowmanagement/kwindowsystem_x11.cpp, line 158
> > <http://git.reviewboard.kde.org/r/107983/diff/4/?file=106081#file106081line158>
> >
> > I thought you should check event->selection == net_wm_cm here, no?
No, but it certainly would not harm below.
winId only select that selection anyway, it should not get others.
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107983/#review25025
-----------------------------------------------------------
On Jan. 9, 2013, 12:52 a.m., Thomas Lübking wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107983/
> -----------------------------------------------------------
>
> (Updated Jan. 9, 2013, 12:52 a.m.)
>
>
> Review request for kdelibs, kwin, Plasma, Aaron J. Seigo, Marco Martin, Martin \
> Gräßlin, and Fredrik Höglund.
>
> Description
> -------
>
> It works fine here (tested so far KWindowSystem signal, KSelectionWatcher only with \
> kwin) with kwin (shift+alt+f12), xcompmgr, compiz & "metacity -c" and e17. Didn't \
> try xfce nor mutter.
> Technically:
> I do not at all understand why KWindowSystem is *not* watching the root window - \
> KSelectionOwner for one is sending events to the root and this also seems the case \
> for all other WMs (at least everything now starts to cause the signal to be \
> emitted)
> The KSelectionWatcher failure seems to be kwin specific (wrote me a cleaner \
> testcase), there'll be some X11 event processing on top that eats away the client \
> messages. So this one can be scratched from the patch, the KWindowSystem issue \
> remains.
>
> This addresses bug 179042.
> http://bugs.kde.org/show_bug.cgi?id=179042
>
>
> Diffs
> -----
>
> kdeui/windowmanagement/kwindowsystem_x11.cpp f9b3cc1
>
> Diff: http://git.reviewboard.kde.org/r/107983/diff/
>
>
> Testing
> -------
>
> see summary
>
>
> Thanks,
>
> Thomas Lübking
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/107983/">http://git.reviewboard.kde.org/r/107983/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On January 9th, 2013, 1:38 a.m., <b>Xuetian \
Weng</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://git.reviewboard.kde.org/r/107983/diff/4/?file=106081#file106081line158" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kdeui/windowmanagement/kwindowsystem_x11.cpp</a> <span \
style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
KWindowSystemPrivate::activate()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">157</font></th> <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="kt">bool</span> <span class="n">haveOwner</span> <span class="o">=</span> \
<span class="n">event</span><span class="o">-></span><span class="n">owner</span> \
<span class="o">!=</span> <span class="n">None</span><span \
class="p">;</span></pre></td> <th bgcolor="#f0f0f0" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">158</font></th> <td bgcolor="#ffffff" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; "> <span class="kt">bool</span> <span \
class="n">haveOwner</span> <span class="o">=</span> <span class="n">event</span><span \
class="o">-></span><span class="n">owner</span> <span class="o">!=</span> <span \
class="n">None</span><span class="p">;</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I thought you should \
check event->selection == net_wm_cm here, no?</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No, but it \
certainly would not harm below. winId only select that selection anyway, it should \
not get others.</pre> <br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On January 9th, 2013, 1:38 a.m., <b>Xuetian \
Weng</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://git.reviewboard.kde.org/r/107983/diff/4/?file=106081#file106081line168" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kdeui/windowmanagement/kwindowsystem_x11.cpp</a> <span \
style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
KWindowSystemPrivate::activate()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">168</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">if</span> <span class="p">(</span> <span class="n">ev</span><span \
class="o">-></span><span class="n">xany</span><span class="p">.</span><span \
class="n">window</span> <span class="o">==</span> <span \
class="n">QX11Info</span><span class="o">::</span><span \
class="n">appRootWindow</span><span class="p">()</span> <span class="p">)</span> \
<span class="p">{</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't quite get \
why this part is required. Since KWindowSystem already calls SelectSelectionInput in \
constructor, just use the above one and do window == winId and event->selection == \
net_wm_cm is enough.</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It's \
required because it is the central aspect about the workaround. The problem is that \
the code as present uses the XFixesSelectSelection to get the event on winId but \
because of the compressing behavior in Qt, it's usually lost. That's the root \
of bug #179042.</pre> <br />
<p>- Thomas</p>
<br />
<p>On January 9th, 2013, 12:52 a.m., Thomas Lübking wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kdelibs, kwin, Plasma, Aaron J. Seigo, Marco Martin, Martin \
Gräßlin, and Fredrik Höglund.</div> <div>By Thomas Lübking.</div>
<p style="color: grey;"><i>Updated Jan. 9, 2013, 12:52 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">It works fine here (tested so far KWindowSystem signal, \
KSelectionWatcher only with kwin) with kwin (shift+alt+f12), xcompmgr, compiz & \
"metacity -c" and e17. Didn't try xfce nor mutter.
Technically:
I do not at all understand why KWindowSystem is *not* watching the root window - \
KSelectionOwner for one is sending events to the root and this also seems the case \
for all other WMs (at least everything now starts to cause the signal to be emitted)
The KSelectionWatcher failure seems to be kwin specific (wrote me a cleaner \
testcase), there'll be some X11 event processing on top that eats away the client \
messages. So this one can be scratched from the patch, the KWindowSystem issue \
remains.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">see summary</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=179042">179042</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kdeui/windowmanagement/kwindowsystem_x11.cpp <span style="color: \
grey">(f9b3cc1)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/107983/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic