Operating System - HP-UX
1834007 Members
1832 Online
110063 Solutions
New Discussion

Re: Looking for an Xwindows "raise/lower window" function

 
SOLVED
Go to solution
Ken Goeppner_1
Occasional Contributor

Looking for an Xwindows "raise/lower window" function

Hello all,

I am needing to control the local window stack attributes from a shell script.
The basic functionality I need is to be able to make a call to the dtwm window manager (I assume) to bring a certain window into focus (raise it) on demand. Is there a built in utility that can do this from the command line?
I am sure I will need to aquire the window name/number as well so is there a uitility for listing the windows that a current shell owns?

I have read many man pages so far such as xsession, twm, X, dtwm and so on but all I see is information on defaults and start up files for windows...nothing on real-time attribute manipulation.

Thanks for any advice you can offer.

Regards,
Ken
Imagine if there were no hypothetical situations
2 REPLIES 2
Mike Stroyan
Honored Contributor
Solution

Re: Looking for an Xwindows "raise/lower window" function

There is no built-in command for manipulating other windows from shell scripts. You can raise a window by id or name using the "xwit" command available from
http://hpux.cs.utah.edu/hppd/hpux/X11/Misc/xwit-1.0/

If you just want to raise a window you could also to that with a dtksh script like the one I have attached.

X terminal emulators such as dtterm and xterm will set the environment variable WINDOWID to their toplevel window. You can use that from shells that inherit the environment of the shell that the terminal emulator started.
Ken Goeppner_1
Occasional Contributor

Re: Looking for an Xwindows "raise/lower window" function

Hey thanks very much for the help Mike!

Your solution was just what I asked for. However, after I invoked the script I realized that I had assumed the "Raise" event would also change the input focus...thought they were one in the same. So after a little reading on the subject I tried adding:

XtRealizeWidget $TOPLEVEL

to the "raise" script you provided and that did the trick.

Once again thanks very much for the help,

Ken
Imagine if there were no hypothetical situations