[Top][All Lists]

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

Re: [XForms] Determine Screen Sizes

From: Serge Bromow
Subject: Re: [XForms] Determine Screen Sizes
Date: Sun, 16 Nov 2014 14:24:31 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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,


                       Best regards, Jens

Serge Bromow
DineAmix Inc.
(613) 260-8629
888 411-6636
Ottawa, Canada.

Please Consider the Environment before Printing the E-Mail. 
IMPORTANT NOTICE: This message is intended only for the use of the individual or entity to which it is addressed. The message may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify DineAmix Inc. immediately by email at address@hidden.

Thank you.

reply via email to

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