[PATCH xserver] xwayland: don't use logical size for RRMode

Olivier Fourdan fourdan at gmail.com
Fri Jul 13 10:03:30 UTC 2018


Hi,

On Tue, 10 Jul 2018 at 11:59, Simon Ser <contact at emersion.fr> wrote:
> Yes, that's intentional. When the physical size isn't available (e.g. when using
> projectors or virtual outputs) we just send zero. Do you think this is harmful?

According to the xrandr protocol definition:
   https://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt

For the definition of RRGetOutputInfo:

  | 'widthInMillimeters' and 'heightInMillimeters' report the physical
  | size of the displayed area. If unknown, or not really fixed (e.g.,
  | for a projector), these values are both zero.

So I reckon using 0 for physical size is valid.

> I like sending zero because it clearly says "this piece of information is not
> relevant in the current situation" instead of faking data. Maybe Xwayland should
> fake it and use a default 96 DPI in this case?
> I'm not aware of any X11 client that breaks because of this (yet).

If zero for the physical size is a valid value (as stated by the
protocol for RRGetOutputInfo), clients should be able to deal with
that or else it's a client bug.

Cheers,
Olivier


More information about the xorg-devel mailing list