[mutter/wip/wayland-display: 51/55] MetaWayland: don't free the wayland surface before we repick



commit e3d1901962eab5603d09b0c8bf69a604a31a5834
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Mon Jul 29 10:59:24 2013 +0200

    MetaWayland: don't free the wayland surface before we repick
    
    The wayland surface is still referenced by the pointer and
    keyboard focus, which need to access it to emit the appropriate
    leave events.

 src/wayland/meta-wayland.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index fd9371e..87e6624 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -490,12 +490,12 @@ meta_wayland_surface_free (MetaWaylandSurface *surface)
                          &surface->pending.frame_callback_list, link)
     wl_resource_destroy (cb->resource);
 
-  g_slice_free (MetaWaylandSurface, surface);
-
   meta_wayland_compositor_repick (compositor);
 
  if (compositor->implicit_grab_surface == surface)
    compositor->implicit_grab_surface = compositor->seat->pointer.current;
+
+  g_slice_free (MetaWaylandSurface, surface);
 }
 
 static void


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