mirror of
https://github.com/swaywm/sway.git
synced 2024-11-04 23:43:14 +00:00
input/keyboard: check keyboard group before remove
In sway_keyboard_destroy, only remove the keyboard from a keyboard group, if it is part of a keyboard group. If the keyboard is not part of a keyboard group, then there is nothing to remove it from
This commit is contained in:
parent
3334d11adc
commit
90e3d25009
|
@ -918,7 +918,9 @@ void sway_keyboard_destroy(struct sway_keyboard *keyboard) {
|
|||
if (!keyboard) {
|
||||
return;
|
||||
}
|
||||
if (keyboard->seat_device->input_device->wlr_device->keyboard->group) {
|
||||
sway_keyboard_group_remove(keyboard);
|
||||
}
|
||||
if (keyboard->keymap) {
|
||||
xkb_keymap_unref(keyboard->keymap);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue