From fa7b686e61dd86f6f26d562362917034de4753dd Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:40:49 +0200 Subject: Fix damage-ring bounds not being set when unplugging -> plugging in monitor #7524 was a partial fix. Seems like this is still an issue when unplugging and plugging the monitor back in. Closes: https://github.com/swaywm/sway/issues/7528 --- sway/desktop/output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 09fc6462..43cd70d0 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -999,9 +999,6 @@ void handle_new_output(struct wl_listener *listener, void *data) { } output->server = server; wlr_damage_ring_init(&output->damage_ring); - int width, height; - wlr_output_transformed_resolution(output->wlr_output, &width, &height); - wlr_damage_ring_set_bounds(&output->damage_ring, width, height); wl_signal_add(&wlr_output->events.destroy, &output->destroy); output->destroy.notify = handle_destroy; @@ -1027,6 +1024,9 @@ void handle_new_output(struct wl_listener *listener, void *data) { transaction_commit_dirty(); + int width, height; + wlr_output_transformed_resolution(output->wlr_output, &width, &height); + wlr_damage_ring_set_bounds(&output->damage_ring, width, height); update_output_manager_config(server); } -- cgit v1.2.3