xserver-multidpi/hw
Olivier Fourdan b0413b6e99 xwayland: Use a fixed DPI value for core protocol
The way Xwayland works (like all Wayland clients), it first queries the
Wayland registry, set up all relevant protocols and then initializes its
own structures.

That means Xwayland will get the Wayland outputs from the Wayland
compositor, compute the physical size of the combined outputs and set
the corresponding Xwayland screen properties accordingly.

Then it creates the X11 screen using fbScreenInit() but does so by using
a default DPI value of 96. That value is used to set the physical size
of the X11 screen, hence overriding the value computed from the actual
physical size provided by the Wayland compositor.

As a result, the DPI computed by tools such as xdpyinfo will always be
96 regardless of the actual screen size and resolution.

However, if the Wayland outputs get reconfigured, or new outputs added,
or existing outputs removed, Xwayland will recompute and update the
physical size of the screen, leading to an unexpected change of DPI.

To avoid that discrepancy, use a fixed size DPI (defaults to 96, and can
be set using the standard command lime option "-dpi") and compute a
physical screen size to match that DPI setting.

Note that only affects legacy core protocols, X11 clients can still get
the actual physical output size as reported by the Wayland compositor
using the RandR protocol, which also allows for the size to be 0 if the
size is unknown or meaningless.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/731
2020-07-03 12:59:23 +00:00
..
dmx Update URL's in man pages 2020-05-10 17:46:33 -07:00
kdrive Xephyr: Cast "red" to char* for xcb_aux_parse_color 2020-01-28 20:35:06 +00:00
vfb Revert https://gitlab.freedesktop.org/xorg/xserver/merge_requests/235 2019-10-14 12:48:24 +02:00
xfree86 modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation 2020-06-27 08:29:45 +00:00
xnest Fix build with gcc 9.3.0's -Werror=alloc-size-larger-than= 2020-05-01 20:02:29 +00:00
xquartz Update URL's in man pages 2020-05-10 17:46:33 -07:00
xwayland xwayland: Use a fixed DPI value for core protocol 2020-07-03 12:59:23 +00:00
xwin hw/xwin: Drop call to setlocale() 2020-04-15 14:13:58 +00:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00
meson.build meson: Move Xvfb build under an option. 2017-09-20 13:19:21 -04:00