diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index c576a593..b900f666 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -558,13 +558,12 @@ void input_manager_reset_all_inputs() { // If there is at least one keyboard using the default keymap, repeat delay, // and repeat rate, then it is possible that there is a keyboard group that - // needs to be reset. This will disarm the keyboards as well as exit and - // re-enter any focus views. + // need their keyboard disarmed. struct sway_seat *seat; wl_list_for_each(seat, &server.input->seats, link) { struct sway_keyboard_group *group; wl_list_for_each(group, &seat->keyboard_groups, link) { - seat_reset_device(seat, group->seat_device->input_device); + sway_keyboard_disarm_key_repeat(group->seat_device->keyboard); } } } diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 1002698e..ba0e020c 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -853,6 +853,12 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) { struct wlr_input_device *wlr_device = keyboard->seat_device->input_device->wlr_device; + if (!sway_assert(!wlr_keyboard_group_from_wlr_keyboard(wlr_device->keyboard), + "sway_keyboard_configure should not be called with a " + "keyboard group's keyboard")) { + return; + } + struct xkb_keymap *keymap = sway_keyboard_compile_keymap(input_config, NULL); if (!keymap) { sway_log(SWAY_ERROR, "Failed to compile keymap. Attempting defaults"); diff --git a/sway/input/seat.c b/sway/input/seat.c index 1d45b256..233267e0 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -692,12 +692,7 @@ static void seat_configure_keyboard(struct sway_seat *seat, if (!seat_device->keyboard) { sway_keyboard_create(seat, seat_device); } - if (!wlr_keyboard_group_from_wlr_keyboard( - seat_device->input_device->wlr_device->keyboard)) { - // Do not configure keyboard group keyboards. They will be configured - // based on the keyboards in the group. - sway_keyboard_configure(seat_device->keyboard); - } + sway_keyboard_configure(seat_device->keyboard); wlr_seat_set_keyboard(seat->wlr_seat, seat_device->input_device->wlr_device); struct sway_node *focus = seat_get_focus(seat);