aboutsummaryrefslogtreecommitdiff
path: root/util/transform.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/transform.c')
-rw-r--r--util/transform.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/transform.c b/util/transform.c
index 4cc725fd..de3f8ef4 100644
--- a/util/transform.c
+++ b/util/transform.c
@@ -23,3 +23,11 @@ enum wl_output_transform wlr_output_transform_compose(
}
return flipped | rotated;
}
+
+void wlr_output_transform_coords(enum wl_output_transform tr, int *x, int *y) {
+ if (tr & WL_OUTPUT_TRANSFORM_90) {
+ int tmp = *x;
+ *x = *y;
+ *y = tmp;
+ }
+}