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>
This commit is contained in:
parent
a0ff90a329
commit
8d9bbe109b
@ -1191,19 +1191,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user