comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » X window display sizes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
X window display sizes [message #17949] Fri, 19 November 1999 00:00 Go to next message
your name is currently offline  your name
Messages: 7
Registered: June 1999
Junior Member
There was an earlier question about finding the size of the display
screen. I am familiar with David's answer:-

DEVICE, GET_SCREEN_SIZE = My_screen_size

However, I am running under OpenVMS, CDE, Motif with X-windows. In my
application, I create displays on a number of display devices using the
DISPLAY_NAME keyword to WIDGET_BASE.

Does anyone know how I can find the size of these (remote) displays?
Some of these displays are PCs with an X-window emulator, so the
resolution may be changed by the users without the knowledge of the
system.

Any help would be appreciated,

Ian

email: Ian.Dean@GECM.COM
Re: X window display sizes [message #17987 is a reply to message #17949] Tue, 23 November 1999 00:00 Go to previous message
your name is currently offline  your name
Messages: 7
Registered: June 1999
Junior Member
Private wrote:
>
> David Fanning wrote:
>>
>> Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes:
>>
>>> I don't know of any way to do this using IDL commands. The only
>>> information you can return about a widget on a remote display seems to
>>> be the geometry of the widget itself, e.g.
>>
>> I don't know. I think the realize-the-upmapped-
>> draw-widget method used in GET_SCREEN_SIZE should
>> work everywhere. There is even a keyword that will
>> enquire of a remote display, I think.
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting
>
> It doesn't work on our systems. It just returns the display size of the
> default display regardless of what you pass to the DISPLAY_NAME argument
> or keyword.
Thanks all for your comments. I have already found the error in the
supplied routine GET_SCREEN_SIZE, and replaced the erroneous code. It
now works OK and I can get the info I need.

Regards,
Ian
>
> After looking at the code further, it seems there is a bug in
> get_screen_size.pro
> in both IDL 5.1 and 5.2. The function specifies the DISPLAY_NAME keyword
> on
> the WIDGET_DRAW function rather than the WIDGET_BASE function.
>
> If I issue the commands manually and and put the DISPLAY_NAME keyword on
> the WIDGET_BASE function it works as expected. I guess I'll be editing
> the .pro
> files.
>
> Now, I wonder if doing this sets the X visual to the default?
>
> --
> Nigel Wade
Re: X window display sizes [message #18002 is a reply to message #17949] Mon, 22 November 1999 00:00 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
your name wrote:
>
> There was an earlier question about finding the size of the display
> screen. I am familiar with David's answer:-
>
> DEVICE, GET_SCREEN_SIZE = My_screen_size
>
> However, I am running under OpenVMS, CDE, Motif with X-windows. In my
> application, I create displays on a number of display devices using the
> DISPLAY_NAME keyword to WIDGET_BASE.
>
> Does anyone know how I can find the size of these (remote) displays?
> Some of these displays are PCs with an X-window emulator, so the
> resolution may be changed by the users without the knowledge of the
> system.
>
> Any help would be appreciated,
>
> Ian
>
> email: Ian.Dean@GECM.COM

You can use the get_screen_size funtion as Dave mentions in a parallel
thread (but check if your version has the same bug I found, posted to
that
thread).

Alternatavely, I have a DLM which makes direct Xlib calls to the X
server
to determine lots of information on the display, screen and available
visuals. It's rather a heavy-weight approach if all you require is the
screen
dimensions but I could make it available if you like. It does require
a C compiler and an X development environment (basically the X header
files).

--
Nigel Wade
Re: X window display sizes [message #18003 is a reply to message #17949] Mon, 22 November 1999 00:00 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
David Fanning wrote:
>
> Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes:
>
>> I don't know of any way to do this using IDL commands. The only
>> information you can return about a widget on a remote display seems to
>> be the geometry of the widget itself, e.g.
>
> I don't know. I think the realize-the-upmapped-
> draw-widget method used in GET_SCREEN_SIZE should
> work everywhere. There is even a keyword that will
> enquire of a remote display, I think.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting


It doesn't work on our systems. It just returns the display size of the
default display regardless of what you pass to the DISPLAY_NAME argument
or keyword.

After looking at the code further, it seems there is a bug in
get_screen_size.pro
in both IDL 5.1 and 5.2. The function specifies the DISPLAY_NAME keyword
on
the WIDGET_DRAW function rather than the WIDGET_BASE function.

If I issue the commands manually and and put the DISPLAY_NAME keyword on
the WIDGET_BASE function it works as expected. I guess I'll be editing
the .pro
files.


Now, I wonder if doing this sets the X visual to the default?


--
Nigel Wade
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Floating base widget
Next Topic: Re: DirectColor on linux

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:39:49 PDT 2025

Total time taken to generate the page: 0.00654 seconds