output scaling chicken-and-egg problem
Maxim Kartashev
maxim.kartashev at jetbrains.com
Fri Dec 2 15:24:57 UTC 2022
Great, thanks for the info! The future has just become a little brighter
:-)
On Fri, Dec 2, 2022 at 6:17 PM Jonas Ådahl <jadahl at redhat.com> wrote:
> On Fri, Dec 02, 2022 at 06:07:55PM +0300, Maxim Kartashev wrote:
> > I wonder if it's possible to set the Wayland buffer scale correctly
> before
> > the window appears on the screen for the first time?
> > AFAIU, the sequence of events wrt proper scaling is roughly as follows:
> > - receive wl_output.scale for each output
> > - create surface, commit
> > - receive xdg_surface.configure
> > - create and attach a buffer, set_buffer_scale(X), commit
> > - receive wl_surface.enter(wl_output Y with scale Z)
> > - realize that Z != X, resize the buffer, do set_buffer_scale(Z)
> >
> > So there's a potential for the window to "twitch" when it first appears
> on
> > some output it didn't anticipate and its scale (and the size of the
> buffer)
> > had to be adjusted. Is there a better way? Or maybe I'm interpreting the
> > protocol in the wrong way?
>
> There is no way right now, but there will be in a future version of the
> core Wayland protocol.
>
> See https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/220
> for details.
>
> A short summary is that you'll receive a "preferred scale" as part of
> the initial configuration that will let you avoid the initial wrong
> scale you otherwise risk when on a HiDPI system.
>
>
> Jonas
>
> >
> > Thanks in advance!
> >
> > Maxim.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/wakefield-dev/attachments/20221202/2405dd85/attachment.htm>
More information about the wakefield-dev
mailing list