<div dir="ltr"><div><span class="gmail-m_5802466645089173799gmail-"><br></span>
>IIRC wl_shell is not defined to be double buffered. Not sure how it's about xdg. There is always the chance of breaking things *cough*Qt*cough* when changing that - even if it is sane.<br><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Xdg definitely is and for v7 this is important as mapping/unmapping is different.<br><br></div><div>* committing a surface with empty buffer on a surface unmaps a window<br><br></div><div>* commiting again (still with an empty buffer) tells the compositor we're going to send a configure event because we're about to remap the window<br><br></div><div>which means we need to be at least be tracking the wl_surface changes even if we don't properly double buffer.<br></div><br></div><div class="gmail_quote">From a Kwin POV, it'd be best to deal with this on the kwayland side as we need to reset the xdg_toplevel state.<br></div><div class="gmail_quote"><br></div>Personally I think deleting the xdgshellsurface in Qt is a lot less messy than the new XDG.  The only thing that doesn't make sense is deleting the wl_surface.</div><br>I wrote a patch that does that. <a href="https://paste.kde.org/pgh8jafqw">https://paste.kde.org/pgh8jafqw</a> <br><br>That works fine for XDG, but wl-shellsurface doesn't like that and remains until you delete the wl_surface. wl_shell_surface_destroy literally sends nothing in wayland_debug. <br><br></div>I think that's why they end up deleting both. It's not a simple thing to abstract when everything behaves so differently.<br><div><div class="gmail_extra"></div><div class="gmail_extra"><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
What could be an idea is to not do anything in KWin till we get the first map event. That is evaluate all the shell options only on map.<span class="gmail-m_5802466645089173799gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
In practice that won't acheive anything as QWaylandWindow::initWindow<br>
calls commit a few times randomly before the expose event that we're<br>
currently hooking into is called. Also kwayland-integration calls<br>
commit on the surface every time it attaches something, which I don't<br>
think is right.<br>
</blockquote>
<br></span>
It is fine given the definition of the interfaces. We setup some state and commit it. If we don't commit we don't know when that will happen. We only adjusted our own relevant states and everything else is not affected.<span class="gmail-m_5802466645089173799gmail-"><br></span></blockquote><br>That would be true if we weren't using these in hooks in the middle of Qt adjusting things. Maybe avoiding that is the right fix though.<br></div><div class="gmail_quote"><span class="gmail-m_5802466645089173799gmail-"></span></div><div class="gmail_quote"><br>----<br><br></div></div><div class="gmail_extra">FWIW I'm meeting Jonas (the XDGShell and scaling guy) in two weeks at Guadec. <br></div></div></div>