From deeb1db1ac7f72a6056bffb868d8b336ef50c91b Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 28 Aug 2013 17:48:20 +0200 Subject: [PATCH] wayland: don't free surfaces that have a window associated After a MetaWaylandSurface is associated with a MetaWindow, it should be freed only when the MetaWindow is unmanaged. For wayland clients, the window is unmanaged when the resource is destroyed, but for X11 clients we want to wait for the unmap event. https://bugzilla.gnome.org/show_bug.cgi?id=705917 --- src/wayland/meta-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index cdb8af3d3..ba3726f7c 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -537,7 +537,7 @@ meta_wayland_surface_resource_destroy_cb (struct wl_resource *resource) meta_window_unmanage (surface->window, timestamp); } - else + else if (!surface->window) meta_wayland_surface_free (surface); } }