[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Stacking Order becomes a ToplevelList and Deleted windows keep position
From: Martin_Gräßlin <kde () martin-graesslin ! com>
Date: 2012-04-24 19:18:29
Message-ID: 20120424191829.32392.39772 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On April 22, 2012, 9:45 p.m., Thomas Lübking wrote:
> > kwin/layers.cpp, line 779
> > <http://git.reviewboard.kde.org/r/104519/diff/1/?file=56206#file56206line779>
> >
> > sorry for the post-review:
> > this is a weak pointer protection, because it relies on
> > a) only Client isNormalWindow
> > b) isNormalWindow is queried before isShown
created https://git.reviewboard.kde.org/r/104714/ for these two issues.
Sorry for introducing the crashers. I will do another very close post review for it.
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104519/#review12714
-----------------------------------------------------------
On April 9, 2012, 9:22 a.m., Martin Gräßlin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104519/
> -----------------------------------------------------------
>
> (Updated April 9, 2012, 9:22 a.m.)
>
>
> Review request for kwin.
>
>
> Description
> -------
>
> A rather large change: stacking_order and unconstrained_stacking_order are changed \
> from ClientList to ToplevelList. This is done for two reasons: 1. It allows us to \
> have Deleted in the stacking order 2. I expect that we will have different Clients \
> inheriting from Toplevel for Wayland
> In all loops over the stacking_order where a Client is expected a qobject_cast to \
> Client is performed and in most cases it's just a continue if the cast does not \
> succeed. I tried to work very carefully with these changes but I would appreciate a \
> very close review, which I will also do again.
> This allowed to fix the bug that Deleted windows are shown above all other windows \
> which is also the root cause of notifications shown on top of screen locker.
> I was sceptical whether the large change is justified for this bug fix, but as it \
> solves a security issue it should go in IMHO.
>
> This addresses bug 158262.
> http://bugs.kde.org/show_bug.cgi?id=158262
>
>
> Diffs
> -----
>
> kwin/activation.cpp 451394f
> kwin/bridge.cpp 897d432
> kwin/client.h 2f55087
> kwin/client.cpp 410ff43
> kwin/deleted.h e52b342
> kwin/deleted.cpp cfca429
> kwin/geometry.cpp 92a23e3
> kwin/layers.cpp ed8555c
> kwin/placement.cpp c9bee78
> kwin/tabbox/tabbox.cpp d699559
> kwin/tiling/tiling.cpp 72df511
> kwin/tiling/tilinglayout.cpp a42c38f
> kwin/toplevel.h 32581a5
> kwin/unmanaged.h f915b12
> kwin/useractions.cpp 09e18c3
> kwin/utils.h 6413da1
> kwin/workspace.h 9df435c
> kwin/workspace.cpp b5c8014
>
> Diff: http://git.reviewboard.kde.org/r/104519/diff/
>
>
> Testing
> -------
>
> 1. Set animation speed to very slow
> 2. Have fade effect enabled
> 3. close a window that is partially obscurred by other windows
> 4. enjoy that it is no longer raised above other windows.
>
>
> Thanks,
>
> Martin Gräßlin
>
>
[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/104519/">http://git.reviewboard.kde.org/r/104519/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On April 22nd, 2012, 9:45 p.m., <b>Thomas \
Lübking</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/104519/diff/1/?file=56206#file56206line779" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/layers.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</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 \
Client::restackWindow(Window above, int detail, NET::RequestSource src, Time \
timestamp, bool send_event)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">744</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="p">(</span> <span class="p">(</span><span class="o">*</span><span \
class="n">it</span><span class="p">)</span><span class="o">-></span><span \
class="n">isNormalWindow</span><span class="p">()</span> <span \
class="o">&&</span> <span class="p"><span class="hl">(</span></span><span \
class="o"><span class="hl">*</span></span><span class="n"><span \
class="hl">it</span></span><span class="p"><span class="hl">)</span></span><span \
class="o">-></span><span class="n">isShown</span><span class="p">(</span><span \
class="kc">true</span><span class="p">)</span> <span \
class="o">&&</span></pre></td> <th bgcolor="#e9eaa8" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">770</font></th> <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span \
class="p">(</span><span class="o">!</span><span class="p">(</span> <span \
class="p">(</span><span class="o">*</span><span class="n">it</span><span \
class="p">)</span><span class="o">-></span><span \
class="n">isNormalWindow</span><span class="p">()</span> <span \
class="o">&&</span> <span class="n"><span class="hl">c</span></span><span \
class="o">-></span><span class="n">isShown</span><span class="p">(</span><span \
class="kc">true</span><span class="p">)</span> <span \
class="o">&&</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;">sorry for the \
post-review: this is a weak pointer protection, because it relies on
a) only Client isNormalWindow
b) isNormalWindow is queried before isShown</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;">created \
https://git.reviewboard.kde.org/r/104714/ for these two issues.
Sorry for introducing the crashers. I will do another very close post review for \
it.</pre> <br />
<p>- Martin</p>
<br />
<p>On April 9th, 2012, 9:22 a.m., Martin Gräßlin 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 kwin.</div>
<div>By Martin Gräßlin.</div>
<p style="color: grey;"><i>Updated April 9, 2012, 9:22 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;">A rather large change: stacking_order and unconstrained_stacking_order \
are changed from ClientList to ToplevelList. This is done for two reasons: 1. It \
allows us to have Deleted in the stacking order 2. I expect that we will have \
different Clients inheriting from Toplevel for Wayland
In all loops over the stacking_order where a Client is expected a qobject_cast to \
Client is performed and in most cases it's just a continue if the cast does not \
succeed. I tried to work very carefully with these changes but I would appreciate a \
very close review, which I will also do again.
This allowed to fix the bug that Deleted windows are shown above all other windows \
which is also the root cause of notifications shown on top of screen locker.
I was sceptical whether the large change is justified for this bug fix, but as it \
solves a security issue it should go in IMHO.</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;">1. Set animation speed to very slow 2. Have fade effect enabled
3. close a window that is partially obscurred by other windows
4. enjoy that it is no longer raised above other windows.</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=158262">158262</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>kwin/activation.cpp <span style="color: grey">(451394f)</span></li>
<li>kwin/bridge.cpp <span style="color: grey">(897d432)</span></li>
<li>kwin/client.h <span style="color: grey">(2f55087)</span></li>
<li>kwin/client.cpp <span style="color: grey">(410ff43)</span></li>
<li>kwin/deleted.h <span style="color: grey">(e52b342)</span></li>
<li>kwin/deleted.cpp <span style="color: grey">(cfca429)</span></li>
<li>kwin/geometry.cpp <span style="color: grey">(92a23e3)</span></li>
<li>kwin/layers.cpp <span style="color: grey">(ed8555c)</span></li>
<li>kwin/placement.cpp <span style="color: grey">(c9bee78)</span></li>
<li>kwin/tabbox/tabbox.cpp <span style="color: grey">(d699559)</span></li>
<li>kwin/tiling/tiling.cpp <span style="color: grey">(72df511)</span></li>
<li>kwin/tiling/tilinglayout.cpp <span style="color: grey">(a42c38f)</span></li>
<li>kwin/toplevel.h <span style="color: grey">(32581a5)</span></li>
<li>kwin/unmanaged.h <span style="color: grey">(f915b12)</span></li>
<li>kwin/useractions.cpp <span style="color: grey">(09e18c3)</span></li>
<li>kwin/utils.h <span style="color: grey">(6413da1)</span></li>
<li>kwin/workspace.h <span style="color: grey">(9df435c)</span></li>
<li>kwin/workspace.cpp <span style="color: grey">(b5c8014)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/104519/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