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
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?
-- 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.