aboutsummaryrefslogtreecommitdiff
path: root/sway/input/keyboard.c
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2020-11-11 21:13:38 -0500
committerSimon Ser <contact@emersion.fr>2020-11-12 10:52:45 +0100
commit9d6787d10d3800ff4873ad6ac3abe4b096090427 (patch)
tree5ed1cd5b1f28c905fd9bd4741e6d1d236102a27e /sway/input/keyboard.c
parent07042486c3c4b8e7083405ba9b34b1b87f8d396d (diff)
input/keyboard: fix Group# bindings for keyboard groups
The keyboard group's effective keyboard layout was never being changed due to a condition that incorrectly preventing it from being performed. The IPC event that follows the change was correctly being prevented.
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r--sway/input/keyboard.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index 0413436e..ce259eb2 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -626,10 +626,12 @@ static void handle_modifier_event(struct sway_keyboard *keyboard) {
determine_bar_visibility(modifiers);
}
- if (wlr_device->keyboard->modifiers.group != keyboard->effective_layout &&
- !wlr_keyboard_group_from_wlr_keyboard(wlr_device->keyboard)) {
+ if (wlr_device->keyboard->modifiers.group != keyboard->effective_layout) {
keyboard->effective_layout = wlr_device->keyboard->modifiers.group;
- ipc_event_input("xkb_layout", keyboard->seat_device->input_device);
+
+ if (!wlr_keyboard_group_from_wlr_keyboard(wlr_device->keyboard)) {
+ ipc_event_input("xkb_layout", keyboard->seat_device->input_device);
+ }
}
}