Xlib: DisplayWidth / DisplayHeight

Zbigniew zbigniew2011 at gmail.com
Wed Aug 30 16:27:12 UTC 2023


> What you want is to find out the width and height of physical screen you
> have.

Indeed. That's what DisplayWidth and DisplayHeight functions have been
created for.

> To do that you need to use the subsystem that manages them - which
> is xrandr. And don't forget to specify which of 5 screen you have running
> you actually mean.

No, dear Volodya,

       „The  DisplayHeight  macro returns the height of the specified screen in
       pixels.

       The DisplayWidth macro returns the width of the screen in pixels.”

This is what I want, and this is what — as „man” page states — I
should get, regardless of presence of any „subsystems”. I want nothing
more than is described there.

Are you serious when stating, that during creation of a program I
should play guessing game „what kind of 'subsystem' the user may
employ”?
-- 
best :)
Z.


More information about the xorg mailing list