[mutter/wayland] wayland: don't free surfaces that have a window associated



commit deeb1db1ac7f72a6056bffb868d8b336ef50c91b
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Aug 28 17:48:20 2013 +0200

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index cdb8af3..ba3726f 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);
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]