Skip to content

Commit

Permalink
output: set damage ring bounds to pixel values
Browse files Browse the repository at this point in the history
  • Loading branch information
vyivel authored and emersion committed Nov 12, 2022
1 parent 34933bb commit 85005b5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sway/desktop/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,9 @@ static void handle_mode(struct wl_listener *listener, void *data) {
arrange_output(output);
transaction_commit_dirty();

wlr_damage_ring_set_bounds(&output->damage_ring,
output->width, output->height);
int width, height;
wlr_output_transformed_resolution(output->wlr_output, &width, &height);
wlr_damage_ring_set_bounds(&output->damage_ring, width, height);
wlr_output_schedule_frame(output->wlr_output);

update_output_manager_config(output->server);
Expand Down Expand Up @@ -872,11 +873,10 @@ static void handle_commit(struct wl_listener *listener, void *data) {
update_output_manager_config(output->server);
}

if (event->committed & (WLR_OUTPUT_STATE_MODE |
WLR_OUTPUT_STATE_TRANSFORM |
WLR_OUTPUT_STATE_SCALE)) {
wlr_damage_ring_set_bounds(&output->damage_ring,
output->width, output->height);
if (event->committed & (WLR_OUTPUT_STATE_MODE | WLR_OUTPUT_STATE_TRANSFORM)) {
int width, height;
wlr_output_transformed_resolution(output->wlr_output, &width, &height);
wlr_damage_ring_set_bounds(&output->damage_ring, width, height);
wlr_output_schedule_frame(output->wlr_output);
}
}
Expand Down

0 comments on commit 85005b5

Please sign in to comment.