diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 04b464bf1..9fb19bfc6 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 bdbf1a383..95a4b5e13 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 ebcd9642e..78f54a2b4 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);