[mutter/wayland] pointer: Remove dead and incorrect code



commit 2930612e64b7f3d9ee441d5e1e2c0beb922d6493
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Nov 19 19:35:29 2013 -0500

    pointer: Remove dead and incorrect code
    
    Now that we can never pick a destroying actor, we can remove these
    bad asserts.

 src/wayland/meta-wayland-pointer.c |   18 ------------------
 src/wayland/meta-wayland-pointer.h |    2 --
 src/wayland/meta-wayland-surface.c |    8 --------
 3 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 04b464b..9fb19bf 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -446,24 +446,6 @@ meta_wayland_pointer_end_modal (MetaWaylandPointer *pointer)
   g_slice_free (MetaWaylandPointerGrab, grab);
 }
 
-/* Called when the focused resource is destroyed */
-void
-meta_wayland_pointer_destroy_focus (MetaWaylandPointer *pointer)
-{
-  if (pointer->grab == &pointer->default_grab)
-    {
-      /* The surface was destroyed, but had the implicit pointer grab.
-         Bypass the grab interface. */
-      g_assert (pointer->button_count > 0);
-
-      /* Note: we focus the NULL interface, not the current one, because
-        we have button down, and the clients would be confused if the
-        pointer enters the surface.
-      */
-      meta_wayland_pointer_set_focus (pointer, NULL);
-    }
-}
-
 typedef struct {
   MetaWaylandPointerGrab  generic;
 
diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h
index bdbf1a3..95a4b5e 100644
--- a/src/wayland/meta-wayland-pointer.h
+++ b/src/wayland/meta-wayland-pointer.h
@@ -76,8 +76,6 @@ meta_wayland_pointer_release (MetaWaylandPointer *pointer);
 void
 meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
                                 MetaWaylandSurface *surface);
-void
-meta_wayland_pointer_destroy_focus (MetaWaylandPointer *pointer);
 
 void
 meta_wayland_pointer_start_grab (MetaWaylandPointer *pointer,
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index ebcd964..78f54a2 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -393,14 +393,6 @@ meta_wayland_surface_free (MetaWaylandSurface *surface)
 
   meta_wayland_compositor_repick (compositor);
 
-  g_assert (surface != compositor->seat->keyboard.focus);
-  if (surface == compositor->seat->pointer.focus)
-    {
-      meta_wayland_pointer_destroy_focus (&compositor->seat->pointer);
-
-      g_assert (surface != compositor->seat->pointer.focus);
-    }
-
   if (surface->resource)
     wl_resource_set_user_data (surface->resource, NULL);
   g_slice_free (MetaWaylandSurface, surface);


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