[comp.windows.x] iconify finale.

mkellehe@polyslo.CalPoly.EDU (Murph Michael J Kelleher) (10/29/88)

In article <4983@polyslo.CalPoly.EDU> I write:
>Help.
>
>I know that one is not supposed to assume there is a window manager in
>an X application, but I want to know if there is a way to request 
>iconification of an application from the program.  Perhaps a hint?
>
>Murph
>mkellehe@polyslo.CalPoly.EDU


In the following few days I got several responses which are summarized
here WITHOUT the consent of any of the writers.  For anyone else out there
with a similar problem, note chdana's advice and Pete Shipley's code.
For those of you with questions in general about the ICCCM, note Matt Landau's
note and David's as well.



1>From trwind!diamond.bbn.com!mlandau Wed Oct 26 11:08:07 1988
1>To: polyslo!mkellehe
1>
1>The details of how an X11 application communicates with a window manager 
1>(or with another application) are being worked out in the Inter-Client
1>Communications Conventions Manual (aka the ICCCM)...
1>
1> Matt Landau			Waiting for a flash of enlightenment
1> mlandau@bbn.com			  in all this blood and thunder


2>From csun!sm.unisys.com!ucla-cs!rutgers!apple!bloom-beacon!SUN.COM!dshr
2>
2>Communications between clients and window managers are specified in
2>the Inter-Client Communications Conventions Manual.  Look in
2>
2>	~x11/doc/conventions
2>
2>	David.


3>You should have been in class.  WM_HINTS property has an initial state
3>field that really is just an "iconic state request" field rather than
3>just an init value.  Change the property with an Xlib call
3>XSetWMHints function call.
3>
3>cd
3>-- 
3>Charles Dana				        |  chdana@polyslo.CalPoly.EDU
3>Computer Science Department			|	    or
3>California Polytechnic State University		|  ucbvax!voder!polyslo!chdana
3>San Luis Obispo, CA.  93407			|


4>Hint:
4>set the window mng. hints to map man iconic
4>then unmap the desired window; Xsync; map the window.
4>
4>
4>		-Pete
4>
4>void
4>closewin()
4>{
4>
4>    XWMHints    xwmh;
4>
4>    extern Display  *disp;
4>    extern Widget toplevel;
4>
4>    xwmh.flags          = StateHint;
4>    xwmh.initial_state  = IconicState;
4>
4>   XSetWMHints(disp, XtWindow(toplevel), &xwmh);
4>    XFlush(disp);
4>    XtUnmapWidget(toplevel);
4>    XtMapWidget(toplevel);
4>
4>    return;
4>}
4>
4>
4>Pete Shipley: 
4>email: shipley@widow.berkeley.edu    Flames:  cimarron@postgres.berkeley.edu 
4>       uunet!lurnix!shipley or ucbvax!shipley or pyramid!hippo!{ root peter }
4>Spelling corections: /dev/null                    Quote: "Anger is an energy"

Thanks for all the help.  It works like a champ!
Murph
mkellehe@polyslo