diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index aedf3ae6c..c5a646c4d 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -1068,6 +1068,13 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) { } } + // If the seat has no active keyboard, set this one + struct wlr_seat *seat = keyboard->seat_device->sway_seat->wlr_seat; + struct wlr_keyboard *current_keyboard = seat->keyboard_state.keyboard; + if (current_keyboard == NULL) { + wlr_seat_set_keyboard(seat, keyboard->wlr); + } + wl_list_remove(&keyboard->keyboard_key.link); wl_signal_add(&keyboard->wlr->events.key, &keyboard->keyboard_key); keyboard->keyboard_key.notify = handle_keyboard_key;