Xlib: DisplayWidth / DisplayHeight
Vladimir Dergachev
volodya at mindspring.com
Wed Aug 30 16:36:33 UTC 2023
On Wed, 30 Aug 2023, Zbigniew wrote:
>> 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
And this what you get. Now when I say "Screen" I mean large rectangular
matrix of pixels I can paint on. Which is pretty much what any application
cares about - you don't need to paint outside of screen.
What do you mean by "Screen" and why ?
Vladimir Dergachev
> 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