diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index 2159cce74..1a02f45c3 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -228,6 +228,9 @@ err_keymap_str: static void release_focus (MetaWaylandKeyboard *keyboard) { + wl_list_remove (&keyboard->focus_surface_listener.link); + wl_list_remove (&keyboard->focus_resource_listener.link); + keyboard->focus_resource = NULL; keyboard->focus_surface = NULL; } diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index d01507f54..30a1e9ef1 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -66,6 +66,9 @@ meta_wayland_pointer_get_seat (MetaWaylandPointer *pointer) static void release_focus (MetaWaylandPointer *pointer) { + wl_list_remove (&pointer->focus_surface_listener.link); + wl_list_remove (&pointer->focus_resource_listener.link); + pointer->focus_resource = NULL; pointer->focus_surface = NULL; }