Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Vladimir Dergachev
Just to make it easier for anyone who is reading this thread in the archives: At the moment the library you need is libxrandr (on Ubuntu install with apt install libxrandr-dev), and read the man page Xrandr. It is also useful to read the paper describing Xrandr protocol:

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Po Lu
Zbigniew writes: > 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

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Carsten Haitzler
On Wed, 30 Aug 2023 18:27:12 +0200 Zbigniew said: Perhaps you should share your use case on why you need to know the screen size when there are far better mechanisms to handle this? But below is a list of why changing these are not sane/possible etc. 1. You cannot change the way

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Julian Bradfield
On 2023-08-30, Zbigniew wrote: >„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,

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Vladimir Dergachev
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

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Zbigniew
> 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

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Vladimir Dergachev
On Wed, 30 Aug 2023, Zbigniew wrote: So I would expect (in my particular case) to get 1920 and 1200 values, and NOT dimensions of virtual screen, I mean 2520 and 1575 The behavior prescribed for these macros is to return the width and height of the screen, and doesn't provide for the

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Zbigniew
>>> Are you making reference to DisplayWidth and DisplayHeight, or >>> DisplayWidthMM and DisplayHeightMM? >> >> Talking about DisplayWidth and DisplayHeight functions. >> >>> And please explain which X extension supplies your ``virtual >>> screen'' functionality >> >> It's done like this: >>

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Po Lu
Zbigniew writes: >> Are you making reference to DisplayWidth and DisplayHeight, or >> DisplayWidthMM and DisplayHeightMM? > > Talking about DisplayWidth and DisplayHeight functions. > >> And please explain which X extension supplies your ``virtual >> screen'' functionality > > It's done like

Re: Xlib: DisplayWidth / DisplayHeight

2023-08-30 Thread Zbigniew
> Are you making reference to DisplayWidth and DisplayHeight, or > DisplayWidthMM and DisplayHeightMM? Talking about DisplayWidth and DisplayHeight functions. > And please explain which X extension supplies your ``virtual screen'' > functionality It's done like this: xrandr --output DVI-0