From 21a57140b635b00d9386c13a94fa3e3c663329f9 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:46:54 +0200 Subject: [PATCH] Moved bounds logic into handle_new_output --- sway/desktop/output.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 2be2c0670..a5262f743 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -826,9 +826,6 @@ static void update_output_manager_config(struct sway_server *server) { config_head->state.y = output_box.y; } - int width, height; - wlr_output_transformed_resolution(output->wlr_output, &width, &height); - wlr_damage_ring_set_bounds(&output->damage_ring, width, height); } wlr_output_manager_v1_set_configuration(server->output_manager_v1, config); @@ -1031,6 +1028,15 @@ void handle_new_output(struct wl_listener *listener, void *data) { transaction_commit_dirty(); + struct sway_output *tmp_output; + wl_list_for_each(tmp_output, &root->all_outputs, link) { + if (tmp_output == root->fallback_output) { + continue; + } + int width, height; + wlr_output_transformed_resolution(tmp_output->wlr_output, &width, &height); + wlr_damage_ring_set_bounds(&tmp_output->damage_ring, width, height); + } update_output_manager_config(server); }