sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit f365ffef34cd4ea039a2a199682fc760c80de21d
parent 2f84d6e349d12f3293c44268bc5c8551340e5787
Author: Brian Ashworth <bosrsf04@gmail.com>
Date:   Thu, 12 Dec 2019 23:39:00 -0500

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.

Diffstat:
Msway/input/keyboard.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c @@ -675,6 +675,8 @@ static void sway_keyboard_group_remove(struct sway_keyboard *keyboard) { struct sway_keyboard_group *sway_group = wlr_group->data; wlr_group->data = NULL; 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); free(sway_group->seat_device->input_device); free(sway_group->seat_device);