Bug 104389

Summary: Output transforms 90 and 270 are inverted
Product: Wayland Reporter: emersion <contact>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description emersion 2017-12-26 21:43:25 UTC
The spec [1] says that wl_output::transform's rotation is counter-clockwise.

However, configuring an output with a 90 degree rotation results in a clockwise rotation. The output rotation reported by weston-info is 90.

90 and 270 degree rotations are swapped. Their flipped variants are swapped too.

This isn't a big issue inside weston because weston apps (like weston-terminal) will behave correctly: they'll rotate their surfaces of 90 degrees clockwise and advertize via wl_surface::set_buffer_transform a 90 degree rotation.

This is more of an issue with other compositors. If another compositor wants to follow the spec, weston apps won't work correctly in this compositor.

[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_output-enum-transform
Comment 1 Pekka Paalanen 2018-01-11 15:51:51 UTC
From the spec: "This describes the transform that a compositor will apply to a surface to compensate for the rotation or mirroring of an output device."

I always get confused whether you rotate the monitor or the surface. So if surface is rotated 90 degrees counter-clockwise, it means the monitor is rotated 90 degrees clockwise. I tried with Weston and you seem to be right: wl_output::transform in weston describes the monitor rotation, not surface rotation.

Because weston.ini is documented as 90 being clockwise rotation of the image, not the monitor, it matches the current Weston behaviour. We'd need to invert the rotation read from weston.ini for sending to clients, and also invert the image rotations we do in Weston and weston clients... right?
Comment 2 GitLab Migration User 2018-06-08 23:55:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/weston/issues/99.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.