[PATCH app/xdpyinfo] Use XRANDR 1.2 extension for reporting dimensions and resolution per output

Pali Rohár pali.rohar at gmail.com
Thu Apr 13 07:42:36 UTC 2017


On Wednesday 12 April 2017 21:52:46 Keith Packard wrote:
> Pali Rohár <pali.rohar at gmail.com> writes:
> 
> > Current usage of DisplayWidthMM() and DisplayHeightMM() does not make sense
> > for multi-monitor configuration. In most cases DPI is set to 96 as there is
> > no sane value.
> >
> > Instead when XRANDR 1.2 extension is supported, report dimensions and
> > resolution information per XRANDR monitor output. It should provide
> > correct DPI value.
> 
> I'd be happy for this to be reported as additional information, but I
> suspect there are numerous shell scripts which parse the old information
> which will get confused by any change in the format.

I tried to make sure that format would not be broken by shell scripts,
which uses grep. What could happen is just more found lines which
matches... but that could happen also now when there are more screens.
So scripts needs to already handle it.

But what is bad... currently xdpyinfo reports nonsense values when
XRANDR 1.2 extension is supported. So I would really suggest to stop
reporting dimensions values when XRANDR 1.2 is used.

Lot of people are complaining about output fro xdpyinfo and thins that X
server itself is broken, but just xdpyinfo is.

-- 
Pali Rohár
pali.rohar at gmail.com


More information about the xorg-devel mailing list