Only set bounds for the current monitor

This commit is contained in:
Erik Reider 2023-04-05 20:57:13 +02:00
parent 21a57140b6
commit 2947757c89

View file

@ -1000,9 +1000,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;
@ -1028,15 +1025,9 @@ 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);
}
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);
}