1
0
Fork 0

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
This commit is contained in:
Carlos Garnacho 2014-07-22 00:30:21 +02:00
parent a02b8441b1
commit 1677a068ce
2 changed files with 2 additions and 0 deletions

View file

@ -301,6 +301,7 @@ meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
void void
meta_wayland_keyboard_release (MetaWaylandKeyboard *keyboard) meta_wayland_keyboard_release (MetaWaylandKeyboard *keyboard)
{ {
meta_wayland_keyboard_set_focus (keyboard, NULL);
meta_wayland_xkb_info_destroy (&keyboard->xkb_info); meta_wayland_xkb_info_destroy (&keyboard->xkb_info);
xkb_context_unref (keyboard->xkb_context); xkb_context_unref (keyboard->xkb_context);

View file

@ -214,6 +214,7 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
void void
meta_wayland_pointer_release (MetaWaylandPointer *pointer) meta_wayland_pointer_release (MetaWaylandPointer *pointer)
{ {
meta_wayland_pointer_set_focus (pointer, NULL);
set_cursor_surface (pointer, NULL); set_cursor_surface (pointer, NULL);
} }