xdg-output: add logical_transform
Compositors might apply two types of transforms to outputs: a software transform applied at compositing time, and a hardware transform applied by the GPU (e.g. via the "rotation" DRM property).
wl_output.geometry already contains a transform hint. Clients use this info to pre-rotate their buffers so that the compositor doesn't need to do it (this is especially useful for direct scan-out). For instance, the Weston clients have this behaviour.
However, in the case of a hardware transform, the compositor doesn't want clients to rotate their buffers because this is already done after compositing. So the compositor will send a NORMAL output transform via wl_output.geometry.
Doing so is fine for most clients, but some special clients like Xwayland use wl_output.geometry's transform to expose it in Xrandr. This results in invalid modes, causing pointer input coordinates issues.
This commit exposes a "logical transform", which is the sum of the software and hardware transforms.
Signed-off-by: Simon Ser contact@emersion.fr