Closed puckipedia closed 1 year ago
Ah, good find! I think you can just remove the buffer to unmap a window:
If
wl_surface.attach
is sent with aNULL
wl_buffer
, the followingwl_surface.commit
will remove the surface content.
This worked for me: https://github.com/talex5/wayland-proxy-virtwl/commit/a508cb93dc92c6e284d32b8a067861c1df0f68c1
Currently, the code creates a window matching an XWayland buffer as soon as possible, and disregards any unmap requests. However, it seems like for some Qt applications at least, the unmap request happens exactly one second before the corresponding buffer is destroyed. This means that e.g. any menu popups take one second longer to close, which is .. very inconvenient.
I have a partial patch at https://github.com/puckipedia/wayland-proxy-virtwl/commit/4e973fcf60992fcb52326a50619e0791cba7b9a9, but it's incomplete as it requires being able to reliably remap windows after being unmapped.