[comp.windows.x] Iconification from another program

rtdickerson@lescsse.jsc.nasa.gov (russel dickerson) (06/12/91)

I'm working on a client which forks off some other clients.  I am
trying to determine how the first program can iconify all of the
others (ie Iconify Session).  As I understand it, the window state
is private and cannot be modified by a program other than the
window manager.  Can another program use the same mechanism??


--
Russell Dickerson : Internet: dickerson@vf.jsc.nasa.gov         +1 713 283 5193
Lockheed (LESC)   % Space Station Freedom Software Support Environment (SSE)
[ The prior material was generated by the standard issue opinion generator
  and in no way represents my employeer/NASA/ or maybe even myself          ]

mikey@eukanuba.wpd.sgi.com (Mike Yang) (06/15/91)

In article <rtdickerson.676675058@node_25d97>, rtdickerson@lescsse.jsc.nasa.gov (russel dickerson) writes:
|> I'm working on a client which forks off some other clients.  I am
|> trying to determine how the first program can iconify all of the
|> others (ie Iconify Session).  As I understand it, the window state
|> is private and cannot be modified by a program other than the
|> window manager.  Can another program use the same mechanism??

True, but you can request that the window manager iconify the window
by using XIconifyWindow.  Therefore, if your client can somehow get
the window ID's of the clients it forks, it can do "session" iconify.

-----------------------------------------------------------------------
                 Mike Yang        Silicon Graphics, Inc.
               mikey@sgi.com           415/335-1786

Stuart.Marks@eng.sun.COM (Stuart Marks) (06/15/91)

    I'm working on a client which forks off some other clients.  I am
    trying to determine how the first program can iconify all of the
    others (ie Iconify Session).  As I understand it, the window state
    is private and cannot be modified by a program other than the
    window manager.  Can another program use the same mechanism??

The WM_STATE property is indeed private and shouldn't be modified by
programs other than the window manager.

However, programs can indeed request state changes of windows that they
didn't create.  All you need is the XID of the windows of the clients you
fork off.  Once you have these IDs, you can call XIconifyWindow() and
XMapWindow() to iconify and deiconify them.

Now, getting your hands on the XIDs of the other windows may be tricky.
If you wrote the child program, one approach is to have it write its
window id(s) into a pipe back up to the parent.

s'marks

Stuart W. Marks			ARPA: smarks@eng.sun.com
Windows & Graphics Software	UUCP: sun!smarks
Sun Microsystems, Inc.