diff options
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 2b90f151..d48ddef3 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -415,16 +415,10 @@ static void damage_surface_iterator(struct sway_output *output, | |||
415 | int center_y = box.y + box.height/2; | 415 | int center_y = box.y + box.height/2; |
416 | 416 | ||
417 | if (pixman_region32_not_empty(&surface->buffer_damage)) { | 417 | if (pixman_region32_not_empty(&surface->buffer_damage)) { |
418 | enum wl_output_transform transform = | ||
419 | wlr_output_transform_invert(surface->current.transform); | ||
420 | |||
421 | pixman_region32_t damage; | 418 | pixman_region32_t damage; |
422 | pixman_region32_init(&damage); | 419 | pixman_region32_init(&damage); |
423 | pixman_region32_copy(&damage, &surface->buffer_damage); | 420 | wlr_surface_get_effective_damage(surface, &damage); |
424 | wlr_region_transform(&damage, &damage, transform, | 421 | wlr_region_scale(&damage, &damage, output->wlr_output->scale); |
425 | surface->current.buffer_width, surface->current.buffer_height); | ||
426 | wlr_region_scale(&damage, &damage, | ||
427 | output->wlr_output->scale / (float)surface->current.scale); | ||
428 | if (ceil(output->wlr_output->scale) > surface->current.scale) { | 422 | if (ceil(output->wlr_output->scale) > surface->current.scale) { |
429 | // When scaling up a surface, it'll become blurry so we need to | 423 | // When scaling up a surface, it'll become blurry so we need to |
430 | // expand the damage region | 424 | // expand the damage region |