From 8c0ef829c9d89f86403b3ca88f525374b9336dcb Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 16 Apr 2014 19:04:09 -0400 Subject: [PATCH] pointer/keyboard: Unset the entire focus when the surface is destroyed Otherwise, we'll end up with dangling parts in our resource list. --- src/wayland/meta-wayland-keyboard.c | 2 +- src/wayland/meta-wayland-pointer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index 08e09341c..0d20f62b8 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -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 diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index f5535a6b1..6929dbd66 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -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