<table><tr><td style="">graesslin 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/D2121" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Fixes desktop window losing the keep-below flag</p></blockquote>

<p>Just saying: this doesn't make sense. Keep-below doesn't matter for a desktop window. I just checked KWin's source code and the layer of the desktop window is only determined by the window type. Keep above/below has no influence on desktop windows. (For those interested kwin.git file abstract_client.cpp method belongsToLayer())</p>

<p>Overall the proposed change worries me. I totally believe you that it fixes the problem and also think that the current code is wrong. What worries me is that we don't understand what's going on here in a very central part of our desktop application. We don't know when we set the window type. That's urgh.</p>

<p>I would say the ensurePlatformWindow needs to be called from the QPlatformSurfaceEvent::SurfaceCreated event. But we should test that whole thing.</p>

<p>What's really important to know is that KWin does not support changes of window type once a window is mapped. This makes the existing code pointless - it cannot update. But it also means that somewhere there is a race that the window type is not properly set.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rPLASMAWORKSPACE Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2121" rel="noreferrer">https://phabricator.kde.org/D2121</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>drosca, Plasma<br /><strong>Cc: </strong>graesslin, plasma-devel, jensreuterberg, abetts, sebas<br /></div>