diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2022-11-12 12:58:48 +0300 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2022-11-12 12:58:48 +0300 |
| commit | 12579a811370a882b0145664755c827224e8a244 (patch) | |
| tree | 1801bf7a5be169d9ff9d9e129fbf0033a8109761 | |
| parent | eda0be2979cb35b3255224dfff00eac605c02d5d (diff) | |
output: set damage ring bounds to pixel values
Fixes: https://github.com/swaywm/sway/issues/7254
(cherry picked from commit 85005b52fe5b832e4ea914fa28048b0c5c803769)
| -rw-r--r-- | sway/desktop/output.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 75651a7a..81a20e25 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -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); @@ -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); } } |
