[Development] Wayland: getting a screen's fractional scale before the first window exists
Fatih Uzunoğlu
fuzun54 at outlook.com
Wed Aug 26 12:24:43 CEST 2026
> They will always come before the xdg_shelll.configure event.
But that defines the latest time, we are interested in the earliest time
it is sent.
My point is/was that if practically major compositors send the scale
right after the initial surface commit, we can rely on that behavior and
do one/two round trips so that we can expose the scale to the
application possibly in `QWindow::create()`, not waiting for the
exposure or `xdg_shelll.configure`.
The idea is that one/two round trips would incur negligible waiting
time, and in turn the application can synchronously use the proper scale.
Of course if the scale depends on which monitor the window is in, it
means that there may be no way to get that in `QWindow::create()`
(assuming that can be known only when the window is configured and
exposed), but in majority of cases where there is one screen or multiple
screens with same scale, the preferred scale (or fractional scale) may
be detected early on, provided that the compositor sends it.
More information about the Development
mailing list