Skip to content

Commit

Permalink
[REBASE ME OUT] config/output: reconfigure input devices after full o…
Browse files Browse the repository at this point in the history
…utput init

Refs swaywm#5231
  • Loading branch information
Xyene committed Apr 25, 2020
1 parent d772471 commit 4c77dfd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions sway/config/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 4c77dfd

Please sign in to comment.