From 4c621cc30fe62d4ca161c6ee540bade6cf1332fc Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 18 Feb 2014 18:39:05 -0500 Subject: [PATCH] pointer/keyboard: Make sure to clean up the destroy listeners when releasing --- src/wayland/meta-wayland-keyboard.c | 3 +++ src/wayland/meta-wayland-pointer.c | 3 +++ 2 files changed, 6 insertions(+) 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; }