Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

Motif FAQ (Part 8 of 9)
Section - 267) How can an application iconify itself?

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Business Photos and Profiles ]


Top Document: Motif FAQ (Part 8 of 9)
Previous Document: 266) How can I start my application in iconic state?
Next Document: 268) How can an application de-iconify itself?
See reader questions & answers on this topic! - Help others by sharing your knowledge

Answer: In R4 and later, use the call XIconifyWindow.  Ken Lee 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);
}


User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Top Document: Motif FAQ (Part 8 of 9)
Previous Document: 266) How can I start my application in iconic state?
Next Document: 268) How can an application de-iconify itself?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)





Last Update March 27 2014 @ 02:11 PM