Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!mcsun!hp4nl!mhres!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.sources.d Subject: XIconifyWindow for calctool on X11R3 Message-ID: Date: 5 Feb 90 22:42:59 GMT References: <1990Feb2.022225.8521@sunaus.oz> Sender: jv@mhres.mh.nl Organization: Multihouse Gouda, the Netherlands Lines: 28 In-reply-to: richb@sunaus.oz's message of 2 Feb 90 02:22:25 GMT The following routine implements iconifying calctool when running under an ICCCM compliant X11R3 window manager: #include #include int XIconifyWindow(dpy, window, screen) Display *dpy; Window window; Screen screen; { XEvent event; event.xclient.type = ClientMessage; event.xclient.display = dpy; event.xclient.window = window; event.xclient.message_type = XInternAtom(dpy, "WM_CHANGE_STATE", False); event.xclient.format = 32; event.xclient.data.l[0] = IconicState; XSendEvent (dpy, DefaultRootWindow(dpy), False, SubstructureRedirectMask|SubstructureNotifyMask, &event); XFlush (dpy); } -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62944/62500 ------------------------ "Arms are made for hugging" -------------------------