wayland: Rework how surface destruction works
To prevent the MetaSurfaceActor from being destroyed, we normally unparent it before we unmanage the window. However, this doesn't work for XWayland windows, which we unmanage when we get UnmapNotify or DestroyNotify, not when we get the wl_surface_destroy. To solve this, add an early hook in meta_window_unmanage that unparents the surface actor if we have one. At the same time, clean up the destruction code to remove old comments and assumptions about how wl_shell behaves.
This commit is contained in:
@ -1498,6 +1498,9 @@ meta_window_unmanage (MetaWindow *window,
|
||||
|
||||
meta_verbose ("Unmanaging 0x%lx\n", window->xwindow);
|
||||
|
||||
if (window->surface)
|
||||
meta_wayland_surface_window_unmanaged (window->surface);
|
||||
|
||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
|
||||
{
|
||||
MetaStackWindow stack_window;
|
||||
|
Reference in New Issue
Block a user