mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
util/transform: add wlr_output_transform_coords()
We hand-roll this in multiple places.
This commit is contained in:
parent
9e702e9cfe
commit
2eb225236e
5 changed files with 30 additions and 36 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue