diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-11-25 21:36:26 -0500 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-11-26 11:31:55 +0100 |
commit | 90e3d25009a201363e5cbe001f344f97f7f7c579 (patch) | |
tree | 0f3b9429e18dbb30dc935f84ffbb92bfa935f2ec /sway/input | |
parent | 3334d11adc926c0f6d86afc4897117d5559036f5 (diff) | |
download | sway-90e3d25009a201363e5cbe001f344f97f7f7c579.tar.xz |
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
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/keyboard.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index e925c00d..a42ce911 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -918,7 +918,9 @@ void sway_keyboard_destroy(struct sway_keyboard *keyboard) { if (!keyboard) { return; } - sway_keyboard_group_remove(keyboard); + if (keyboard->seat_device->input_device->wlr_device->keyboard->group) { + sway_keyboard_group_remove(keyboard); + } if (keyboard->keymap) { xkb_keymap_unref(keyboard->keymap); } |