Screen size cannot rely on wl_output scale and geometry
@jadahl
Submitted by Jonas Ådahl Assigned to Wayland bug list
Link to original bug (#101436)
Description
Currently, Xwayland will configure its screen and monitors given the wl_output's it sees being advertised.
It uses the dimensions of the current mode, together with its x/y coordinate, where each wl_output is treated as a separate monitor. The wl_output.scale event is completely ignored.
In practice, the actual screen size and monitor sizes that Xwayland should have, may thus be something else.
Some examples:
-
A compositor may advertise a wl_output with scale 2, and have a logical pixel coordinate space it places windows on where the content wl_output region is also scaled by 2. Here Xwayland should treat a 1024x768 wl_output with scale 2 as 512x384 large internal monitor.
-
A compositor may advertise a wl_output with scale 2 in the same way as above, but in fact its logical representation of the output scaled with a fractional scale, which is not advertised at all. In this case, Xwayland has no way to know the expected screen and monitor size.
-
A compositor may advertise a wl_output with scale 2, but its logical coordinate space is always identical to the physical pixel coordinate space, meaning Xwayland should as it does now completely ignore the wl_output scale.
To solve this, we need to introduce a protocol (Xwayland specific or not) that communicates the logical geometry of each wl_output.