aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@posteo.net>2021-08-23 23:33:16 +0300
committerSimon Ser <contact@emersion.fr>2021-08-24 10:36:06 +0200
commit72a156b18aea4da5a87823da8a10ace389f9325e (patch)
tree4bac40e4fec243bc61cd7659d5d7de0c891862e7
parent664307f9682eaac573b22a2282a6d089e1abd489 (diff)
surface: fix wlr_surface_get_buffer_source_box()
-rw-r--r--types/wlr_surface.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index be872b7c..4446252b 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -1473,14 +1473,7 @@ void wlr_surface_get_buffer_source_box(struct wlr_surface *surface,
box->y = surface->current.viewport.src.y * surface->current.scale;
box->width = surface->current.viewport.src.width * surface->current.scale;
box->height = surface->current.viewport.src.height * surface->current.scale;
- if ((surface->current.transform & WL_OUTPUT_TRANSFORM_90) != 0) {
- double tmp = box->x;
- box->x = box->y;
- box->y = tmp;
-
- tmp = box->width;
- box->width = box->height;
- box->height = tmp;
- }
+ wlr_fbox_transform(box, box, surface->current.transform,
+ surface->current.buffer_width, surface->current.buffer_height);
}
}