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
This commit is contained in:
llyyr 2024-05-26 01:46:34 +05:30 committed by Simon Ser
parent 4c3c060211
commit e32bdaa7be

View file

@ -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);