summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/input/input-manager.c5
-rw-r--r--sway/input/keyboard.c6
-rw-r--r--sway/input/seat.c7
3 files changed, 9 insertions, 9 deletions
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() {
558 558
559 // If there is at least one keyboard using the default keymap, repeat delay, 559 // If there is at least one keyboard using the default keymap, repeat delay,
560 // and repeat rate, then it is possible that there is a keyboard group that 560 // and repeat rate, then it is possible that there is a keyboard group that
561 // needs to be reset. This will disarm the keyboards as well as exit and 561 // need their keyboard disarmed.
562 // re-enter any focus views.
563 struct sway_seat *seat; 562 struct sway_seat *seat;
564 wl_list_for_each(seat, &server.input->seats, link) { 563 wl_list_for_each(seat, &server.input->seats, link) {
565 struct sway_keyboard_group *group; 564 struct sway_keyboard_group *group;
566 wl_list_for_each(group, &seat->keyboard_groups, link) { 565 wl_list_for_each(group, &seat->keyboard_groups, link) {
567 seat_reset_device(seat, group->seat_device->input_device); 566 sway_keyboard_disarm_key_repeat(group->seat_device->keyboard);
568 } 567 }
569 } 568 }
570} 569}
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) {
853 struct wlr_input_device *wlr_device = 853 struct wlr_input_device *wlr_device =
854 keyboard->seat_device->input_device->wlr_device; 854 keyboard->seat_device->input_device->wlr_device;
855 855
856 if (!sway_assert(!wlr_keyboard_group_from_wlr_keyboard(wlr_device->keyboard),
857 "sway_keyboard_configure should not be called with a "
858 "keyboard group's keyboard")) {
859 return;
860 }
861
856 struct xkb_keymap *keymap = sway_keyboard_compile_keymap(input_config, NULL); 862 struct xkb_keymap *keymap = sway_keyboard_compile_keymap(input_config, NULL);
857 if (!keymap) { 863 if (!keymap) {
858 sway_log(SWAY_ERROR, "Failed to compile keymap. Attempting defaults"); 864 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,
692 if (!seat_device->keyboard) { 692 if (!seat_device->keyboard) {
693 sway_keyboard_create(seat, seat_device); 693 sway_keyboard_create(seat, seat_device);
694 } 694 }
695 if (!wlr_keyboard_group_from_wlr_keyboard( 695 sway_keyboard_configure(seat_device->keyboard);
696 seat_device->input_device->wlr_device->keyboard)) {
697 // Do not configure keyboard group keyboards. They will be configured
698 // based on the keyboards in the group.
699 sway_keyboard_configure(seat_device->keyboard);
700 }
701 wlr_seat_set_keyboard(seat->wlr_seat, 696 wlr_seat_set_keyboard(seat->wlr_seat,
702 seat_device->input_device->wlr_device); 697 seat_device->input_device->wlr_device);
703 struct sway_node *focus = seat_get_focus(seat); 698 struct sway_node *focus = seat_get_focus(seat);