aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar llyyr <llyyr.public@gmail.com>2024-05-26 01:46:34 +0530
committerLibravatar Simon Ser <contact@emersion.fr>2024-07-03 08:41:46 +0200
commite32bdaa7bead5052dd32c12917ea8f74a9b14405 (patch)
treea1e1f3f8c86c90d5170bd01d4e5ed5c83365a55f
parentinput/keyboard: refactor into sway_keyboard_set_layout (diff)
downloadsway-e32bdaa7bead5052dd32c12917ea8f74a9b14405.tar.gz
sway-e32bdaa7bead5052dd32c12917ea8f74a9b14405.tar.zst
sway-e32bdaa7bead5052dd32c12917ea8f74a9b14405.zip
input/keyboard: don't set layout for virtual keyboard device
This prevents us from recompiling keymap every time a virtual device is created by clients like fcitx5
-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 91a4f866..efb9ac39 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -1074,7 +1074,9 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) {
1074 keyboard->repeat_rate, keyboard->repeat_delay); 1074 keyboard->repeat_rate, keyboard->repeat_delay);
1075 } 1075 }
1076 1076
1077 sway_keyboard_set_layout(keyboard, input_config); 1077 if (!keyboard->seat_device->input_device->is_virtual) {
1078 sway_keyboard_set_layout(keyboard, input_config);
1079 }
1078 1080
1079 wl_list_remove(&keyboard->keyboard_key.link); 1081 wl_list_remove(&keyboard->keyboard_key.link);
1080 wl_signal_add(&keyboard->wlr->events.key, &keyboard->keyboard_key); 1082 wl_signal_add(&keyboard->wlr->events.key, &keyboard->keyboard_key);