pointer/keyboard: Make sure to clean up the destroy listeners when releasing

This commit is contained in:
Jasper St. Pierre 2014-02-18 18:39:05 -05:00
parent 756a412436
commit 4c621cc30f
2 changed files with 6 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}