pointer/keyboard: Unset focus_resource when the surface is destroyed

focus_resource is supposed to be set only if focus_surface is
as well.
This commit is contained in:
Jasper St. Pierre 2014-02-22 18:11:20 -05:00
parent 14841475b5
commit 337c69e223
2 changed files with 6 additions and 0 deletions

View File

@ -224,6 +224,9 @@ keyboard_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
wl_list_remove (&keyboard->focus_surface_listener.link);
keyboard->focus_surface = NULL;
wl_list_remove (&keyboard->focus_resource_listener.link);
keyboard->focus_resource = NULL;
}
static void

View File

@ -62,6 +62,9 @@ pointer_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
wl_list_remove (&pointer->focus_surface_listener.link);
pointer->focus_surface = NULL;
wl_list_remove (&pointer->focus_resource_listener.link);
pointer->focus_resource = NULL;
}
static void