diff options
author | Erik Reider <35975961+ErikReider@users.noreply.github.com> | 2023-04-06 10:40:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 10:40:49 +0200 |
commit | fa7b686e61dd86f6f26d562362917034de4753dd (patch) | |
tree | 39d460aa4c5cf0c506d1bf4974819a5b19e59edd /sway/desktop/output.c | |
parent | swaybar: Lift background clearing out of main rendering function (diff) | |
download | sway-fa7b686e61dd86f6f26d562362917034de4753dd.tar.gz sway-fa7b686e61dd86f6f26d562362917034de4753dd.tar.zst sway-fa7b686e61dd86f6f26d562362917034de4753dd.zip |
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
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 6 |
1 files 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) { | |||
999 | } | 999 | } |
1000 | output->server = server; | 1000 | output->server = server; |
1001 | wlr_damage_ring_init(&output->damage_ring); | 1001 | wlr_damage_ring_init(&output->damage_ring); |
1002 | int width, height; | ||
1003 | wlr_output_transformed_resolution(output->wlr_output, &width, &height); | ||
1004 | wlr_damage_ring_set_bounds(&output->damage_ring, width, height); | ||
1005 | 1002 | ||
1006 | wl_signal_add(&wlr_output->events.destroy, &output->destroy); | 1003 | wl_signal_add(&wlr_output->events.destroy, &output->destroy); |
1007 | output->destroy.notify = handle_destroy; | 1004 | output->destroy.notify = handle_destroy; |
@@ -1027,6 +1024,9 @@ void handle_new_output(struct wl_listener *listener, void *data) { | |||
1027 | 1024 | ||
1028 | transaction_commit_dirty(); | 1025 | transaction_commit_dirty(); |
1029 | 1026 | ||
1027 | int width, height; | ||
1028 | wlr_output_transformed_resolution(output->wlr_output, &width, &height); | ||
1029 | wlr_damage_ring_set_bounds(&output->damage_ring, width, height); | ||
1030 | update_output_manager_config(server); | 1030 | update_output_manager_config(server); |
1031 | } | 1031 | } |
1032 | 1032 | ||