[Development] Wayland: getting a screen's fractional scale before the first window exists
Fatih Uzunoğlu
fuzun54 at outlook.com
Mon Aug 24 18:27:34 CEST 2026
Hello,
Regarding:
> until the surface is configured by the compositor
I am not sure if the protocol guarantees when
`wl_surface::preferred_buffer_scale` is sent (or
`wp_fractional_scale_v1::preferred_scale` in fractional scale case), but
if in practice major compositors send the scale within one or two event
loop cycles, then for the sake of application's convenience maybe
`QWindow::create()` may do one or two arbitrary `wl_display_roundtrip()`
after the initial commit just to expect the compositor to send the scale.
The waiting time here would probably be negligible, and in turn the
application can immediately use the proper scale since the roundtrip
call is blocking, provided that the compositor sent it.
More information about the Development
mailing list