diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-04-25 19:06:51 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-04-26 09:13:39 +0200 |
commit | c3c9737e8bbce365b1fa8b8f9bbd02e246ced02f (patch) | |
tree | 35369e9804b9480a418361934501d71295de38b9 | |
parent | input/cursor: correctly transfer focus when using tablet pen (diff) | |
download | sway-c3c9737e8bbce365b1fa8b8f9bbd02e246ced02f.tar.gz sway-c3c9737e8bbce365b1fa8b8f9bbd02e246ced02f.tar.zst sway-c3c9737e8bbce365b1fa8b8f9bbd02e246ced02f.zip |
config/output: reconfigure input devices after full output init
Previously in 3de1a39, it "worked by accident" in my testing since the
display being used in `map_to_output` was initialized first (the map
would not be applied because the display hadn't actually come online
yet), and was followed by a second display (at which point the map would
get applied for the first display).
Refs #5231
-rw-r--r-- | sway/config/output.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 9720bbf3..5aaa4d93 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -388,17 +388,6 @@ static void queue_output_config(struct output_config *oc, | |||
388 | oc->adaptive_sync); | 388 | oc->adaptive_sync); |
389 | wlr_output_enable_adaptive_sync(wlr_output, oc->adaptive_sync == 1); | 389 | wlr_output_enable_adaptive_sync(wlr_output, oc->adaptive_sync == 1); |
390 | } | 390 | } |
391 | |||
392 | // Reconfigure all devices, since input config may have been applied before | ||
393 | // this output came online, and some config items (like map_to_output) are | ||
394 | // dependent on an output being present. | ||
395 | struct sway_input_device *input_device = NULL; | ||
396 | wl_list_for_each(input_device, &server.input->devices, link) { | ||
397 | struct sway_seat *seat = NULL; | ||
398 | wl_list_for_each(seat, &server.input->seats, link) { | ||
399 | seat_configure_device(seat, input_device); | ||
400 | } | ||
401 | } | ||
402 | } | 391 | } |
403 | 392 | ||
404 | bool apply_output_config(struct output_config *oc, struct sway_output *output) { | 393 | bool apply_output_config(struct output_config *oc, struct sway_output *output) { |
@@ -489,6 +478,17 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
489 | output->max_render_time = oc->max_render_time; | 478 | output->max_render_time = oc->max_render_time; |
490 | } | 479 | } |
491 | 480 | ||
481 | // Reconfigure all devices, since input config may have been applied before | ||
482 | // this output came online, and some config items (like map_to_output) are | ||
483 | // dependent on an output being present. | ||
484 | struct sway_input_device *input_device = NULL; | ||
485 | wl_list_for_each(input_device, &server.input->devices, link) { | ||
486 | struct sway_seat *seat = NULL; | ||
487 | wl_list_for_each(seat, &server.input->seats, link) { | ||
488 | seat_configure_device(seat, input_device); | ||
489 | } | ||
490 | } | ||
491 | |||
492 | return true; | 492 | return true; |
493 | } | 493 | } |
494 | 494 | ||