From c3c9737e8bbce365b1fa8b8f9bbd02e246ced02f Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sat, 25 Apr 2020 19:06:51 -0400 Subject: 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 --- sway/config/output.c | 22 +++++++++++----------- 1 file 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, oc->adaptive_sync); wlr_output_enable_adaptive_sync(wlr_output, oc->adaptive_sync == 1); } - - // Reconfigure all devices, since input config may have been applied before - // this output came online, and some config items (like map_to_output) are - // dependent on an output being present. - struct sway_input_device *input_device = NULL; - wl_list_for_each(input_device, &server.input->devices, link) { - struct sway_seat *seat = NULL; - wl_list_for_each(seat, &server.input->seats, link) { - seat_configure_device(seat, input_device); - } - } } 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) { output->max_render_time = oc->max_render_time; } + // Reconfigure all devices, since input config may have been applied before + // this output came online, and some config items (like map_to_output) are + // dependent on an output being present. + struct sway_input_device *input_device = NULL; + wl_list_for_each(input_device, &server.input->devices, link) { + struct sway_seat *seat = NULL; + wl_list_for_each(seat, &server.input->seats, link) { + seat_configure_device(seat, input_device); + } + } + return true; } -- cgit v1.2.3-54-g00ecf