<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: KWin, Plasma.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: kwin, plasma-devel.<br />graesslin requested review of this revision.<br />Restricted Application edited projects, added Plasma; removed KWin.
</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/D9967" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>With GTK applications our code showed issues. With GTK the sequence for<br />
a menu or dialog window is:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">create surface</li>
<li class="remarkup-list-item">create server side decoration</li>
<li class="remarkup-list-item">request csd</li>
<li class="remarkup-list-item">create xdg_shell_surface</li>
</ol>

<p>Which result in KWin to have the ServerSideDecoration object being<br />
created before the ShellClient is created. The connect for mode changed<br />
happens in ShellClient, which is too late to catch that the window<br />
requested client side decoration. Thus KWin created a decoration about<br />
things such as a menu.</p>

<p>This change moves the acknowledge of the mode to WaylandServer. As we<br />
anyway always acknowledge the requested mode we can also do it there and<br />
don't require ShellClient to be present. Thus when the ShellClient is<br />
created the mode is properly reflected and no decoration is created.</p>

<p>BUG: 389117<br />
FIXED-IN: 5.12.0</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Played a lot with evince</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>deco-acknowledge-server-5.12</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9967" rel="noreferrer">https://phabricator.kde.org/D9967</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>shell_client.cpp<br />
wayland_server.cpp</div></div></div><br /><div><strong>To: </strong>graesslin, KWin, Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>