Parent document is top of "Motif FAQ (Part 8 of 9)"
Previous document is "267) How can I start my application in iconic state?"
Next document is "269) How can an application de-iconify itself?"
268) How can an application iconify itself?
Answer: In R4 and later, use the call XIconifyWindow. Ken Lee
(http://www.rahul.net/kenton/) adds "Set XmNiconic on your shell. This should
work in X11R6 and later patch levels of X11R5."
For R3, send an event to the root window with a type of WM_CHANGE_STATE and
data IconicState.
void
IconifyMe (dpy, win)
Display *dpy;
Window win; /* toplevel window to iconify */
{
Atom xa_WM_CHANGE_STATE;
XClientMessageEvent ev;
xa_WM_CHANGE_STATE = XInternAtom (dpy,
"WM_CHANGE_STATE", False);
ev.type = ClientMessage;
ev.display = dpy;
ev.message_type = xa_WM_CHANGE_STATE;
ev.format = 32;
ev.data.l[0] = IconicState;
ev.window = win;
XSendEvent (dpy,
RootWindow (dpy, DefaultScreen(dpy)),
True,
(SubstructureRedirectMask | SubstructureNotifyMask),
&ev);
XFlush (dpy);
}
Parent document is top of "Motif FAQ (Part 8 of 9)"
Previous document is "267) How can I start my application in iconic state?"
Next document is "269) How can an application de-iconify itself?"