diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index dde0e71b1..cb227a9c7 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -211,19 +211,6 @@ keyboard_handle_focus_surface_destroy (struct wl_listener *listener, void *data) MetaWaylandKeyboard *keyboard = wl_container_of (listener, keyboard, focus_surface_listener); keyboard->focus_surface = NULL; - - if (keyboard->focus_resource) - { - wl_list_remove (&keyboard->focus_resource_listener.link); - keyboard->focus_resource = NULL; - } -} - -static void -keyboard_handle_focus_resource_destroy (struct wl_listener *listener, void *data) -{ - MetaWaylandKeyboard *keyboard = wl_container_of (listener, keyboard, focus_resource_listener); - keyboard->focus_resource = NULL; } @@ -294,7 +281,6 @@ meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard, wl_array_init (&keyboard->keys); keyboard->focus_surface_listener.notify = keyboard_handle_focus_surface_destroy; - keyboard->focus_resource_listener.notify = keyboard_handle_focus_resource_destroy; keyboard->default_grab.interface = &default_keyboard_grab_interface; keyboard->default_grab.keyboard = keyboard; @@ -444,7 +430,6 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard, uint32_t serial = wl_display_next_serial (display); wl_keyboard_send_leave (keyboard->focus_resource, serial, keyboard->focus_surface->resource); - wl_list_remove (&keyboard->focus_resource_listener.link); keyboard->focus_resource = NULL; } @@ -473,7 +458,6 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard, wl_keyboard_send_enter (keyboard->focus_resource, serial, keyboard->focus_surface->resource, &keyboard->keys); - wl_resource_add_destroy_listener (keyboard->focus_resource, &keyboard->focus_resource_listener); keyboard->focus_serial = serial; } } diff --git a/src/wayland/meta-wayland-keyboard.h b/src/wayland/meta-wayland-keyboard.h index d2c71ffaf..f67d02f67 100644 --- a/src/wayland/meta-wayland-keyboard.h +++ b/src/wayland/meta-wayland-keyboard.h @@ -82,7 +82,6 @@ struct _MetaWaylandKeyboard MetaWaylandSurface *focus_surface; struct wl_listener focus_surface_listener; struct wl_resource *focus_resource; - struct wl_listener focus_resource_listener; uint32_t focus_serial; MetaWaylandKeyboardGrab *grab; diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index d80df1d63..7ed2255f7 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -60,19 +60,6 @@ pointer_handle_focus_surface_destroy (struct wl_listener *listener, void *data) MetaWaylandPointer *pointer = wl_container_of (listener, pointer, focus_surface_listener); pointer->focus_surface = NULL; - - if (pointer->focus_resource) - { - wl_list_remove (&pointer->focus_resource_listener.link); - pointer->focus_resource = NULL; - } -} - -static void -pointer_handle_focus_resource_destroy (struct wl_listener *listener, void *data) -{ - MetaWaylandPointer *pointer = wl_container_of (listener, pointer, focus_resource_listener); - pointer->focus_resource = NULL; } @@ -271,7 +258,6 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer) wl_list_init (&pointer->resource_list); pointer->focus_surface_listener.notify = pointer_handle_focus_surface_destroy; - pointer->focus_resource_listener.notify = pointer_handle_focus_resource_destroy; pointer->default_grab.interface = &default_pointer_grab_interface; pointer->default_grab.pointer = pointer; @@ -332,7 +318,6 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer, uint32_t serial = wl_display_next_serial (display); wl_pointer_send_leave (pointer->focus_resource, serial, pointer->focus_surface->resource); - wl_list_remove (&pointer->focus_resource_listener.link); pointer->focus_resource = NULL; } @@ -365,7 +350,6 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer, wl_pointer_send_enter (pointer->focus_resource, serial, pointer->focus_surface->resource, sx, sy); } - wl_resource_add_destroy_listener (pointer->focus_resource, &pointer->focus_resource_listener); pointer->focus_serial = serial; } } diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h index d5e303838..98b536cb5 100644 --- a/src/wayland/meta-wayland-pointer.h +++ b/src/wayland/meta-wayland-pointer.h @@ -49,7 +49,6 @@ struct _MetaWaylandPointer MetaWaylandSurface *focus_surface; struct wl_listener focus_surface_listener; struct wl_resource *focus_resource; - struct wl_listener focus_resource_listener; guint32 focus_serial; guint32 click_serial;