[mutter/gnome-42] wayland/surface: Swap 90 and 270 degree transforms
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-42] wayland/surface: Swap 90 and 270 degree transforms
- Date: Fri, 3 Jun 2022 12:05:10 +0000 (UTC)
commit cd52c57bc65a25363a25ee575b0c9d1d4e471ba8
Author: Robert Mader <robert mader posteo de>
Date: Fri Feb 14 20:04:28 2020 +0100
wayland/surface: Swap 90 and 270 degree transforms
Our internal interpretation of output transforms is not in line with
the Wayland spec. Wayland describes them as the transform that a
compositor will apply to a surface to compensate for the rotation
or mirroring of an output device - counter-clockwise.
Mutter in turn interprets it the other way around. One could
argue it does the same but clock-wise - or it interprets the transform
from the viewpoint of the content, not the device.
In either way, the difference is that 90 and 270 degree values are
switched. Thus swap these accordingly when we translate from
`WL_OUTPUT_TRANSFORM` to `META_MONITOR_TRANSFORM`.
See: https://gitlab.freedesktop.org/wayland/weston/issues/99
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1055>
(cherry picked from commit 8d9bbe109b16969557672330da0d6a26adc8eae2)
src/wayland/meta-wayland-surface.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index bd6499cf0b..e8fb8fd08d 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -1192,19 +1192,19 @@ transform_from_wl_output_transform (int32_t transform_value)
case WL_OUTPUT_TRANSFORM_NORMAL:
return META_MONITOR_TRANSFORM_NORMAL;
case WL_OUTPUT_TRANSFORM_90:
- return META_MONITOR_TRANSFORM_90;
+ return META_MONITOR_TRANSFORM_270;
case WL_OUTPUT_TRANSFORM_180:
return META_MONITOR_TRANSFORM_180;
case WL_OUTPUT_TRANSFORM_270:
- return META_MONITOR_TRANSFORM_270;
+ return META_MONITOR_TRANSFORM_90;
case WL_OUTPUT_TRANSFORM_FLIPPED:
return META_MONITOR_TRANSFORM_FLIPPED;
case WL_OUTPUT_TRANSFORM_FLIPPED_90:
- return META_MONITOR_TRANSFORM_FLIPPED_90;
+ return META_MONITOR_TRANSFORM_FLIPPED_270;
case WL_OUTPUT_TRANSFORM_FLIPPED_180:
return META_MONITOR_TRANSFORM_FLIPPED_180;
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
- return META_MONITOR_TRANSFORM_FLIPPED_270;
+ return META_MONITOR_TRANSFORM_FLIPPED_90;
default:
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]