aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-11-25 21:36:26 -0500
committerSimon Ser <contact@emersion.fr>2019-11-26 11:31:55 +0100
commit90e3d25009a201363e5cbe001f344f97f7f7c579 (patch)
tree0f3b9429e18dbb30dc935f84ffbb92bfa935f2ec /sway/input
parent3334d11adc926c0f6d86afc4897117d5559036f5 (diff)
downloadsway-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.c4
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);
}