summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2014-07-22 00:30:21 +0200
committerCarlos Garnacho <carlosg@gnome.org>2014-07-22 18:01:29 +0200
commit1677a068ce666fcb057421fb6d771ebcdb41b46c (patch)
treea948dff5eeddf9f06012fa6504bc4732de9e708f
parenta02b8441b13c1831562f1a143297d3d024e65ae1 (diff)
downloadmutter-1677a068ce666fcb057421fb6d771ebcdb41b46c.tar.gz
wayland: Unset keyboard/pointer focus when releasing the data for these devices
Otherwise the focus_surface_listener list element becomes stale, and then mangled if the devices' data is initialized again, and the memory memset(). https://bugzilla.gnome.org/show_bug.cgi?id=733563
-rw-r--r--src/wayland/meta-wayland-keyboard.c1
-rw-r--r--src/wayland/meta-wayland-pointer.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 4ee7fcd90..c7dc96115 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -301,6 +301,7 @@ meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
void
meta_wayland_keyboard_release (MetaWaylandKeyboard *keyboard)
{
+ meta_wayland_keyboard_set_focus (keyboard, NULL);
meta_wayland_xkb_info_destroy (&keyboard->xkb_info);
xkb_context_unref (keyboard->xkb_context);
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index ce22e7c48..a603335d4 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -214,6 +214,7 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
void
meta_wayland_pointer_release (MetaWaylandPointer *pointer)
{
+ meta_wayland_pointer_set_focus (pointer, NULL);
set_cursor_surface (pointer, NULL);
}