<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/128571/">https://git.reviewboard.kde.org/r/128571/</a>
</td>
</tr>
</table>
<br />
<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 Plasma and Marco Martin.</div>
<div>By Eike Hein.</div>
<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=366278">366278</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-framework
</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;">Panel popup dialogs along with other applications of Plasma::Dialog
(e.g. Kicker's submenus) currently don't correctly set WM_TRANSIENT_FOR
to the id of their parent window on X11. This causes them to interact
badly with auto-hide panels which do not set struts, e.g. Kicker's
submenus open behind the panel.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Internally, Dialog makes calls to QWindow::setFlags when its window
type is "Normal" (the default) and otherwise uses KWindowSystem's
setType. (Kicker's subclass, SubMenu, does an additional
KWindowSystem::setType call for NET::Menu). Neither CompactApplet
nor Kicker change their Dialog's 'type' property to anything else,
so their dialogs are "Normal", thus going the setFlags route with
no setType calls.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Dialog also sets its transient parent to the window the visualParent
item is inside of.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now here is where things break down: QXcbWindow will update
WM_TRANSIENT_PARENT for in show(), but only when an inline function
called isTransient returns true. isTransient decides this based on
window type, which is determined from the flags set with
QWindow::setFlags. Calls to KWindowSystem::setType would have no
bearing on this; there seems to be no mapping back from external
state. This is why setting Dialog.type to e.g. "DialogWindow" does
nothing.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch takes the route of adding Qt::Dialog to the starting
flags - after all Dialog is a dialog. That means isTransient()
will consider the window to be a transient and those
setTransientParent calls Dialog does will not be ignored. In the
case of CompactApplet, no further calls to KWS::setType are done;
Kicker continues to call it with NET::Menu to get desired window
manager behavior.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In light testing everything still seems too work, with the added
benefit of fixing:
BUG:366278</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That said, the weird mess of setFlags and setType and state in the
windowing system vs. Qt is horrible and sad.</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>src/plasmaquick/dialog.cpp <span style="color: grey">(eb9fc79)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/128571/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>