mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
input/keyboard: remove group listeners on destroy
This adds two missing calls to wl_list_remove to remove the key and modifier listeners for the keyboard group's keyboard when destroying the keyboard group. This fixes some crashes when changing the keymap of the last keyboard in a group with a keyboard binding.
This commit is contained in:
parent
2f84d6e349
commit
f365ffef34
1 changed files with 2 additions and 0 deletions
|
@ -675,6 +675,8 @@ static void sway_keyboard_group_remove(struct sway_keyboard *keyboard) {
|
||||||
struct sway_keyboard_group *sway_group = wlr_group->data;
|
struct sway_keyboard_group *sway_group = wlr_group->data;
|
||||||
wlr_group->data = NULL;
|
wlr_group->data = NULL;
|
||||||
wl_list_remove(&sway_group->link);
|
wl_list_remove(&sway_group->link);
|
||||||
|
wl_list_remove(&sway_group->keyboard_key.link);
|
||||||
|
wl_list_remove(&sway_group->keyboard_modifiers.link);
|
||||||
sway_keyboard_destroy(sway_group->seat_device->keyboard);
|
sway_keyboard_destroy(sway_group->seat_device->keyboard);
|
||||||
free(sway_group->seat_device->input_device);
|
free(sway_group->seat_device->input_device);
|
||||||
free(sway_group->seat_device);
|
free(sway_group->seat_device);
|
||||||
|
|
Loading…
Reference in a new issue