diff options
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r-- | sway/input/input-manager.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index dc07cbf0..c576a593 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -4,15 +4,17 @@ | |||
4 | #include <string.h> | 4 | #include <string.h> |
5 | #include <math.h> | 5 | #include <math.h> |
6 | #include <wlr/backend/libinput.h> | 6 | #include <wlr/backend/libinput.h> |
7 | #include <wlr/types/wlr_cursor.h> | ||
8 | #include <wlr/types/wlr_keyboard_group.h> | ||
7 | #include <wlr/types/wlr_input_inhibitor.h> | 9 | #include <wlr/types/wlr_input_inhibitor.h> |
8 | #include <wlr/types/wlr_virtual_keyboard_v1.h> | 10 | #include <wlr/types/wlr_virtual_keyboard_v1.h> |
9 | #include <wlr/types/wlr_virtual_pointer_v1.h> | 11 | #include <wlr/types/wlr_virtual_pointer_v1.h> |
10 | #include <wlr/types/wlr_cursor.h> | ||
11 | #include "sway/config.h" | 12 | #include "sway/config.h" |
13 | #include "sway/input/cursor.h" | ||
12 | #include "sway/input/input-manager.h" | 14 | #include "sway/input/input-manager.h" |
15 | #include "sway/input/keyboard.h" | ||
13 | #include "sway/input/libinput.h" | 16 | #include "sway/input/libinput.h" |
14 | #include "sway/input/seat.h" | 17 | #include "sway/input/seat.h" |
15 | #include "sway/input/cursor.h" | ||
16 | #include "sway/ipc-server.h" | 18 | #include "sway/ipc-server.h" |
17 | #include "sway/server.h" | 19 | #include "sway/server.h" |
18 | #include "sway/tree/view.h" | 20 | #include "sway/tree/view.h" |
@@ -553,6 +555,18 @@ void input_manager_reset_all_inputs() { | |||
553 | wl_list_for_each(input_device, &server.input->devices, link) { | 555 | wl_list_for_each(input_device, &server.input->devices, link) { |
554 | input_manager_reset_input(input_device); | 556 | input_manager_reset_input(input_device); |
555 | } | 557 | } |
558 | |||
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 | ||
561 | // needs to be reset. This will disarm the keyboards as well as exit and | ||
562 | // re-enter any focus views. | ||
563 | struct sway_seat *seat; | ||
564 | wl_list_for_each(seat, &server.input->seats, link) { | ||
565 | struct sway_keyboard_group *group; | ||
566 | wl_list_for_each(group, &seat->keyboard_groups, link) { | ||
567 | seat_reset_device(seat, group->seat_device->input_device); | ||
568 | } | ||
569 | } | ||
556 | } | 570 | } |
557 | 571 | ||
558 | 572 | ||