Skip to content

Commit

Permalink
Init the damage_ring bounds on output creation
Browse files Browse the repository at this point in the history
Otherwise the initial bounds would be `INT_MAX` until `handle_mode` or `handle_commit` is called :)
  • Loading branch information
ErikReider authored and emersion committed Mar 26, 2023
1 parent f21090f commit ac1ed63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sway/desktop/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,9 @@ 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;
Expand Down

4 comments on commit ac1ed63

@quoing
Copy link

@quoing quoing commented on ac1ed63 Mar 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mine 2nd monitor output is clipped after applying this.. anyone else? Should I file an issue?

@quoing
Copy link

@quoing quoing commented on ac1ed63 Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #7528 logged.

@ErikReider
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quoing does #7530 fix this?

@quoing
Copy link

@quoing quoing commented on ac1ed63 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ErikReider that seems to be working for my setup..

~ swaymsg -t get_version                                    
sway version 1.9-dev-3e19cb98 (Mar 31 2023, branch 'makepkg')

Please sign in to comment.