mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 14:04:11 +01: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) {
|
if (!keyboard) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (keyboard->seat_device->input_device->wlr_device->keyboard->group) {
|
||||||
sway_keyboard_group_remove(keyboard);
|
sway_keyboard_group_remove(keyboard);
|
||||||
|
}
|
||||||
if (keyboard->keymap) {
|
if (keyboard->keymap) {
|
||||||
xkb_keymap_unref(keyboard->keymap);
|
xkb_keymap_unref(keyboard->keymap);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user