XWayland Rootful Lands HiDPI / Fractional Scaling Support

Written by Michael Larabel in Wayland on 20 March 2024 at 06:30 AM EDT. 8 Comments
WAYLAND
Running XWayland in rootful mode now allows for working HiDPI and fractional scaling support.

XWayland's rootful mode can allow for easily running an entire desktop within a window on a Wayland session. The XWayland rootful mode saw lots of work over the past year and back in November a full request providing HiDPI support was opened. It's that code that was finally merged overnight.

XWayland rootful mode


The merge request went through finally and now XWayland when in rootful mode can enjoy HiDPI. Red Hat's Olivier Fourdan explained of his work in that merge request:
"As we all know too well, Xwayland does not play nice with HiDPI or even fractional scaling in Wayland.
The reason for this is that Xwayland always applies the same scale 1 to all its surfaces, regardless of the actual scale specified by the Wayland output.

This is unfortunately necessary because Xwayland is an X11 server and all X11 clients running on a Wayland desktop share the same Xwayland rootless server, so it's impossible to have mixed scaled between different X11 clients depending on which outpout they reside (see #1318 for my take on this).

But the same limitation about mixed DPI does not apply to rootful Xwayland, since all X11 clients running on a rootful Xwayland are visually placed on the same visible root window, so we could just resize the root window depending on the output scale, like any other Wayland client does.

That means that moving the rootful window from an output with scale 1 to another output with scale 2 would trigger an XRandR reconfiguration."

Another step forward for Wayland support this year in what's looking to be quite nice and seeing more sunsetting around conventional X.Org in 2024.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week