diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2020-06-02 11:23:46 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2020-07-03 12:59:23 +0000 |
commit | b0413b6e99c6b5fbc04229ce64ddf1f41b08e63e (patch) | |
tree | f2c98b226ce383fa044819a88f4d7c151fe09267 /hw/xfree86/i2c/xf86i2c.c | |
parent | 6748a4094158d2bde1630b915a5318f9f22c8e0a (diff) |
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
Diffstat (limited to 'hw/xfree86/i2c/xf86i2c.c')
0 files changed, 0 insertions, 0 deletions