Skip to content

Commit fa7b686

Browse files
authored
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: #7528
1 parent 9cf66e8 commit fa7b686

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sway/desktop/output.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -999,9 +999,6 @@ void handle_new_output(struct wl_listener *listener, void *data) {
999999
}
10001000
output->server = server;
10011001
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);
10051002

10061003
wl_signal_add(&wlr_output->events.destroy, &output->destroy);
10071004
output->destroy.notify = handle_destroy;
@@ -1027,6 +1024,9 @@ void handle_new_output(struct wl_listener *listener, void *data) {
10271024

10281025
transaction_commit_dirty();
10291026

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);
10301030
update_output_manager_config(server);
10311031
}
10321032

0 commit comments

Comments
 (0)