Window always in background [message #7462] |
Tue, 19 November 1996 00:00  |
Th. Boettger
Messages: 1 Registered: November 1996
|
Junior Member |
|
|
Can anyone tell me how I can tell IDL to leave on window in the
background? The window manager is always switching the window you click
on in the forground. I mustn't switch this off.
Thanks if there is a solution
Thomas Boettger
|
|
|
Re: Window always in background [message #7538 is a reply to message #7462] |
Thu, 21 November 1996 00:00  |
Tim Patterson
Messages: 65 Registered: October 1995
|
Member |
|
|
Th. Boettger wrote:
>
> Can anyone tell me how I can tell IDL to leave on window in the
> background? The window manager is always switching the window you click
> on in the forground. I mustn't switch this off.
>
> Thanks if there is a solution
>
> Thomas Boettger
Not an IDL solution, but under Motif at least, there
is usually a "Raise When Made Active" under the window
manager menu somewhere. Switch this off, and clicking
in a window anywhere except the title bar will make it
active but not bring it to the front.
Tim
--
http://condor.lpl.arizona.edu/~tim/
|
|
|
Re: Window always in background [message #7541 is a reply to message #7462] |
Thu, 21 November 1996 00:00  |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
On Tue, 19 Nov 1996, Th. Boettger wrote:
> Can anyone tell me how I can tell IDL to leave on window in the
> background? The window manager is always switching the window you click
> on in the forground. I mustn't switch this off.
> Thanks if there is a solution
I think that there's no reasonable way to accomplish this from within
IDL and for all platforms; it's reallly a responsibility of the platform's
window manager.
But if you're using Unix/Motif then you can deactivate this feature for
(all) IDL widgets (and leave it active for other windows) as follows:
. Edit your .Xdefaults file - add the line:
Mwm*Idl*focusAutoRaise: False
. Activate the change with "xrdb -load .Xdefaults", and restart the window
manager (or terminate your session and log on again).
You might have a go at making this behaviour specific to selected IDL
widgets by using the RESOURCE_NAME facility in the widgets' top-level
bases, and with a suitable Mwm*...*focusAutoRaise entry in .Xdefaults.
(I'm not sure that this will work, but it might be worth a try.)
If you're using MS Windows then this little avenue is closed, and you
will have to resort to trickery to stop your window from coming to the
foreground when in focus.
In your event handler for the "don't care" window, include a statement like
WIDGET_CONTROL,event.top,SHOW=0 for each type of event (button clicks,
droplist changes etc), so that the window gets shoved into the background
whenever the user interacts with it. (Here, "event" is the event
structure passed to your handler by IDL.)
This is obviously quite a crude solution. You might take a different
approach - identify windows which you DON'T want obscured by others;
keep these windows' TLB IDs in some globally-accessible spot; bring these
windows to the foreground when you get an event in the "don't care" window.
I hope this helps.
Peter Mason
|
|
|