pointer/keyboard: Unset the entire focus when the surface is destroyed

Otherwise, we'll end up with dangling parts in our resource list.
This commit is contained in:
Jasper St. Pierre 2014-04-16 19:04:09 -04:00
parent eb1c9175f9
commit 8c0ef829c9
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ 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;
meta_wayland_keyboard_set_focus (keyboard, NULL);
}
static gboolean

View File

@ -59,7 +59,7 @@ 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;
meta_wayland_pointer_set_focus (pointer, NULL);
}
static void