Skip to content

wayland/surface: Add fallback for get_highest_output_scale

Robert Mader requested to merge rmader/mutter:preferred_scale_fallback into main

If we don't have a monitor for a surface - e.g. because the surface is not mapped yet - return the highest scale of all outputs. This makes us send a preferred scale before a client draws its first frame. The highest scale is always correct in single monitor cases and arguably a good option otherwise as scaling down usually looks better than scaling up.

Note that this is currently only used by the fractional scale protocol, but will also be used for the core send_preferred_scale() once we implement it.

Merge request reports