mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
wayland-keyboard: Disconnect from backend signals on release
Otherwise we'll access freed memory in the handlers. The wayland keyboard is released when the seat loses the keyboard capability which happens when leaving the VT so if there are keymap changes while switched away from the VT we would crash. https://bugzilla.gnome.org/show_bug.cgi?id=747263
This commit is contained in:
parent
f3fecd478d
commit
4aa74af694
@ -411,6 +411,11 @@ meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
|
||||
void
|
||||
meta_wayland_keyboard_release (MetaWaylandKeyboard *keyboard)
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
|
||||
g_signal_handlers_disconnect_by_func (backend, on_keymap_changed, keyboard);
|
||||
g_signal_handlers_disconnect_by_func (backend, on_keymap_layout_group_changed, keyboard);
|
||||
|
||||
meta_wayland_keyboard_set_focus (keyboard, NULL);
|
||||
meta_wayland_xkb_info_destroy (&keyboard->xkb_info);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user