diff options
| author | llyyr <llyyr.public@gmail.com> | 2024-05-26 01:46:34 +0530 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2024-07-03 08:41:46 +0200 |
| commit | e32bdaa7bead5052dd32c12917ea8f74a9b14405 (patch) | |
| tree | a1e1f3f8c86c90d5170bd01d4e5ed5c83365a55f | |
| parent | 4c3c0602116c12c2821e1e505e7248b3c642b4ca (diff) | |
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.c | 4 |
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) { keyboard->repeat_rate, keyboard->repeat_delay); } - sway_keyboard_set_layout(keyboard, input_config); + if (!keyboard->seat_device->input_device->is_virtual) { + sway_keyboard_set_layout(keyboard, input_config); + } wl_list_remove(&keyboard->keyboard_key.link); wl_signal_add(&keyboard->wlr->events.key, &keyboard->keyboard_key); |
