aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index b900f666..69342c73 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -521,6 +521,22 @@ static void retranslate_keysyms(struct input_config *input_config) {
521 } 521 }
522} 522}
523 523
524static void input_manager_configure_input(
525 struct sway_input_device *input_device) {
526 sway_input_configure_libinput_device(input_device);
527 struct sway_seat *seat = NULL;
528 wl_list_for_each(seat, &server.input->seats, link) {
529 seat_configure_device(seat, input_device);
530 }
531}
532
533void input_manager_configure_all_inputs(void) {
534 struct sway_input_device *input_device = NULL;
535 wl_list_for_each(input_device, &server.input->devices, link) {
536 input_manager_configure_input(input_device);
537 }
538}
539
524void input_manager_apply_input_config(struct input_config *input_config) { 540void input_manager_apply_input_config(struct input_config *input_config) {
525 struct sway_input_device *input_device = NULL; 541 struct sway_input_device *input_device = NULL;
526 bool wildcard = strcmp(input_config->identifier, "*") == 0; 542 bool wildcard = strcmp(input_config->identifier, "*") == 0;
@@ -531,11 +547,7 @@ void input_manager_apply_input_config(struct input_config *input_config) {
531 if (strcmp(input_device->identifier, input_config->identifier) == 0 547 if (strcmp(input_device->identifier, input_config->identifier) == 0
532 || wildcard 548 || wildcard
533 || type_matches) { 549 || type_matches) {
534 sway_input_configure_libinput_device(input_device); 550 input_manager_configure_input(input_device);
535 struct sway_seat *seat = NULL;
536 wl_list_for_each(seat, &server.input->seats, link) {
537 seat_configure_device(seat, input_device);
538 }
539 } 551 }
540 } 552 }
541 553
@@ -550,7 +562,7 @@ void input_manager_reset_input(struct sway_input_device *input_device) {
550 } 562 }
551} 563}
552 564
553void input_manager_reset_all_inputs() { 565void input_manager_reset_all_inputs(void) {
554 struct sway_input_device *input_device = NULL; 566 struct sway_input_device *input_device = NULL;
555 wl_list_for_each(input_device, &server.input->devices, link) { 567 wl_list_for_each(input_device, &server.input->devices, link) {
556 input_manager_reset_input(input_device); 568 input_manager_reset_input(input_device);
@@ -568,7 +580,6 @@ void input_manager_reset_all_inputs() {
568 } 580 }
569} 581}
570 582
571
572void input_manager_apply_seat_config(struct seat_config *seat_config) { 583void input_manager_apply_seat_config(struct seat_config *seat_config) {
573 sway_log(SWAY_DEBUG, "applying seat config for seat %s", seat_config->name); 584 sway_log(SWAY_DEBUG, "applying seat config for seat %s", seat_config->name);
574 if (strcmp(seat_config->name, "*") == 0) { 585 if (strcmp(seat_config->name, "*") == 0) {