xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Determine Screen Sizes


From: jon
Subject: Re: [XForms] Determine Screen Sizes
Date: Sun, 16 Nov 2014 20:08:05 +0000

On Sun, 2014-11-16 at 14:24 -0500, Serge Bromow wrote:
> Thanks Jens,
> 
> On 11/16/2014 02:06 PM, Jens Thoms Toerring wrote:
> 
> > Hi Serge,
> > 
> > On Sun, Nov 16, 2014 at 12:07:24PM -0500, Serge Bromow wrote:
> > > Not sure this is an Xforms question but I will put it out there. We
> > > are doing more and more work with dual monitors. I have historically
> > > used "fl_scrw, fl_scrh" to determine the screen size for the purpose
> > > of placing forms, scaling and so on. In my personal case both
> > > screens are identical so it is fairly obvious that the width
> > > returned by fl_scrw, 3840(x1080) could not be the real size of a
> > > known aspect ration so I simply divide by 2 to determine the real
> > > size of each screen. More recently people are mixing screen sizes
> > > rendering my simple formula mute. I can parse xrandr output to gain
> > > the individual screen sizes but was wondering if there is a call in
> > > xforms or in X to discover individual monitor sizes?
> > Interesting question! As far as I can see XForms is not even
> > aware of two screens existing. 'fl_scrw' and 'fl_scrh' are
> > set by the following calls of X11 macros
> > 
> >     fl_scrh = DisplayHeight( fl_display, fl_screen );
> >     fl_scrw = DisplayWidth( fl_display, fl_screen );
> > 
> > There's nothing for checking if there is more than a screen -
> > when XForms was written stuff like that simply didn't exist;-)
> > Probably this would require linking with that libXext (or
> > whatever has the functions used xrandr), which is not the
> > case at the moment.
> > 
> > It also would be interesting to know what the values of
> > 'fl_scrw' and fl_scrh' are when there are screen of dif-
> > ferent sizes - could be something strange.
> Well I can help with this. The first test odd setup was with a 15"
> 1024x768 on the left and a 17" 1440x900 on the right. The return
> values were  width of 2464x 900. The addition of the widths and the
> largest value of the height. The application when scaled full size
> without a border spanned both screens and the bottom of the 15" screen
> was missing the bottom of the application. Which I might add had the
> exit button on it. lol..
> 
> > 
> > Since I've never used more than a single screen I'll have
> > to borrow a second one and do some playing around before
> > I can saty anything more...
> I wouldn't spend any time on this. I suspect it has to do with
> identifying the connect hardware and selected resolutions. Parsing
> xrandr's output will do fine. I don't think xforms is the place to
> find this information since the display for both monitors appear as
> screen:0.0 unlike a dual X setup where one is :0.0 and the other :0.1.
> It happens it is handier to have the 2 monitors act as 1 desktop.
> 
> Thanks for your input Jens,
> 
> Serge

The above info is accurate and useful, just to add my little bit....

>From memory X has two ways it can treat multiple monitors. Most setups
are configured as one display of "monitor" times the width.  IE two
1920x1080 (like I am using here) is one 3840x1920 display.

But it is possible to have X treat them as separate displays, in that
case X display ":0" would be 1920x1080 as would display ":1"

For basic info use xwininfo utility and just click on the root window
(background) - this info is pretty much all X itself knows about the
display.

Window placement (including monitor selection in multiple monitor non
spanned setup) is up to the display manager....

Jon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]