[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request 128824: Add KWindowSystem::closeWindow(WId) and its unit test
From: Martin_Gräßlin <mgraesslin () kde ! org>
Date: 2016-09-09 11:06:00
Message-ID: 20160909110600.5301.56633 () mimi ! kde ! org
[Download RAW message or body]
--===============8498815002193256611==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
> On Sept. 8, 2016, 11:06 p.m., Kai Uwe Broulik wrote:
> > src/platforms/xcb/kwindowsystem.cpp, lines 674-676
> > <https://git.reviewboard.kde.org/r/128824/diff/1/?file=475922#file475922line674>
> >
> > KWindowSystemPrivateX11 is only used on X11, so this check is unneccessary.
> >
> > In any case, this is the wrong way to check for running on X: This function calls \
> > into the QPA to get a native resource called "connection". Both Qt's X and \
> > Wayland QPA have one. On Wayland, however, it will get a wl_connection and cast \
> > that to an X connection and crash miserably when using it below.
>
> Paulo Lieuthier wrote:
> I added the check because I saw it in other methods. Removed it now.
@Kai: while you are right in general your explanation is wrong. The problem you \
describe exists with QX11Info::display() but not with QX11Info::connection()
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128824/#review99003
-----------------------------------------------------------
On Sept. 9, 2016, 4:33 a.m., Paulo Lieuthier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128824/
> -----------------------------------------------------------
>
> (Updated Sept. 9, 2016, 4:33 a.m.)
>
>
> Review request for kwin, Martin Gräßlin and Harald Sitter.
>
>
> Repository: kwindowsystem
>
>
> Description
> -------
>
> This missing function will enable LXQt's taskbar to not depend directly on \
> NETRootInfo or KWayland. It's weird you haven't added it before, as Plasma's old \
> and new taskbars call the base libraries directly as far as I can see.
>
> Diffs
> -----
>
> autotests/kwindowsystemx11test.cpp 363c805
> src/kwindowsystem.h a282ecd
> src/kwindowsystem.cpp fda1682
> src/kwindowsystem_dummy_p.h 736a6f2
> src/kwindowsystem_p.h 5f30042
> src/platforms/osx/kwindowsystem.cpp 1758829
> src/platforms/wayland/kwindowsystem.cpp a5dfa93
> src/platforms/wayland/kwindowsystem_p_wayland.h 14aa73e
> src/platforms/xcb/kwindowsystem.cpp 091c71a
> src/platforms/xcb/kwindowsystem_p_x11.h 72df642
>
> Diff: https://git.reviewboard.kde.org/r/128824/diff/
>
>
> Testing
> -------
>
> I installed on my system and tested it through LXQt's taskbar.
>
>
> Thanks,
>
> Paulo Lieuthier
>
>
--===============8498815002193256611==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/128824/">https://git.reviewboard.kde.org/r/128824/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On September 8th, 2016, 11:06 p.m. CEST, <b>Kai \
Uwe Broulik</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="https://git.reviewboard.kde.org/r/128824/diff/1/?file=475922#file475922line674" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/platforms/xcb/kwindowsystem.cpp</a> <span style="font-weight: \
normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<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">674</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="o">!</span><span \
class="n">QX11Info</span><span class="o">::</span><span \
class="n">connection</span><span class="p">())</span> <span \
class="p">{</span></pre></td> </tr>
<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">675</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">return</span><span class="p">;</span></pre></td> </tr>
<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">676</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <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;">KWindowSystemPrivateX11 \
is only used on X11, so this check is unneccessary.
In any case, this is the wrong way to check for running on X: This function calls \
into the QPA to get a native resource called "connection". Both Qt's X \
and Wayland QPA have one. On Wayland, however, it will get a wl_connection and cast \
that to an X connection and crash miserably when using it below.</pre> </blockquote>
<p>On September 9th, 2016, 4:34 a.m. CEST, <b>Paulo Lieuthier</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
added the check because I saw it in other methods. Removed it now.</p></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;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">@Kai: while you are right in general your explanation is wrong. The problem \
you describe exists with QX11Info::display() but not with \
QX11Info::connection()</p></pre> <br />
<p>- Martin</p>
<br />
<p>On September 9th, 2016, 4:33 a.m. CEST, Paulo Lieuthier wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for kwin, Martin Gräßlin and Harald Sitter.</div>
<div>By Paulo Lieuthier.</div>
<p style="color: grey;"><i>Updated Sept. 9, 2016, 4:33 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kwindowsystem
</div>
<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This missing function will enable LXQt's taskbar to \
not depend directly on NETRootInfo or KWayland. It's weird you haven't added it \
before, as Plasma's old and new taskbars call the base libraries directly as far as I \
can see.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I installed on my system and tested it through LXQt's \
taskbar.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>autotests/kwindowsystemx11test.cpp <span style="color: \
grey">(363c805)</span></li>
<li>src/kwindowsystem.h <span style="color: grey">(a282ecd)</span></li>
<li>src/kwindowsystem.cpp <span style="color: grey">(fda1682)</span></li>
<li>src/kwindowsystem_dummy_p.h <span style="color: grey">(736a6f2)</span></li>
<li>src/kwindowsystem_p.h <span style="color: grey">(5f30042)</span></li>
<li>src/platforms/osx/kwindowsystem.cpp <span style="color: \
grey">(1758829)</span></li>
<li>src/platforms/wayland/kwindowsystem.cpp <span style="color: \
grey">(a5dfa93)</span></li>
<li>src/platforms/wayland/kwindowsystem_p_wayland.h <span style="color: \
grey">(14aa73e)</span></li>
<li>src/platforms/xcb/kwindowsystem.cpp <span style="color: \
grey">(091c71a)</span></li>
<li>src/platforms/xcb/kwindowsystem_p_x11.h <span style="color: \
grey">(72df642)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/128824/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============8498815002193256611==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic