How to support mixed DPI in Xwayland?

Olivier Fourdan fourdan at gmail.com
Mon Sep 11 07:08:02 UTC 2017


Hi

On 10 September 2017 at 22:25, Joseph Burt <caseorum at gmail.com> wrote:

>
> I'm now up to date on the relevant bug reports. Sorry for the spam.
>
> What about always running the X server at hardware resolution,
> limiting the size of lodpi clients on the XWM side, and letting the
> compositor scale them?
>

That's pretty much what we do already in mutter 3.26 with
'frame-monitor-framebuffer' enabled (and weston and kwin already do this as
well -or so I heard-), but the problem is the X11 clients that can take
advantage of hiDPI, you don't want to scale them...

When scaling up the LoDPI X11 clients, you need to adjust the advertised
screen size accordingly, because a LoDPI client configuring its X11 window
to be, say 300x200 will end up with a surface of size 600x400 once scaled
by 2 by the compositor when mapped on screen, so in that case the X server
needs to adjust, i.e. downscale, the screen size advertised to the LoDPI
clients by the same factor so that a client basing its window size/location
on the screen size ends up with the expected size/location when mapped on
the output, that's https://patchwork.freedesktop.org/patch/175578/

But when dealing with HiDPI aware X11 clients, you don't want to scale
those because they already know better how to render their contents without
additional scaling, so eventually, these clients need to have access to the
actual un-scaled screen size, meaning that the screen size as advertised to
X11 clients actually depends on the client being capable of taking
advantage of HiDPI...

Cheers,
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170911/6aea511f/attachment-0001.html>


More information about the wayland-devel mailing list