🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.d
Article #5226

XIconifyWindow for calctool on X11R3

#5226
From: Johan Vromans
Date: Mon, 05 Feb 1990 22:42
28 lines
1416 bytes
The following routine implements iconifying calctool when running
under an ICCCM compliant X11R3 window manager:

#include <X11/Xlib.h>
#include <X11/Xutil.h>
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" -------------------------
Technical Details
Message-ID: <JV.90Feb5154259@mhres.mh.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!mcsun!hp4nl!mhres!jv
References: <1990Feb2.022225.8521@sunaus.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <JV.90Feb5154259@mhres.mh.nl>
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