Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!mhres!squirrel!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.windows.x Subject: Re: Self-Iconification and Emacs (X11R3 code) Message-ID: <1990Sep29.104407.19584@squirrel.mh.nl> Date: 29 Sep 90 10:44:07 GMT References: Sender: jv@squirrel.mh.nl (Johan Vromans) Reply-To: Johan Vromans Organization: Multihouse Automation, the Netherlands Lines: 50 In-Reply-To: meissner@osf.org's message of 29 Sep 90 00:23:58 GMT Here is the X11R3 code to iconize Emacs 18.55: Add to x11fns.c: ================ DEFUN ("x-iconify-window", Fx_iconify_window, Sx_iconify_window, 0, 0, 0, "Iconifies the X window.") () { if (WindowMapped) { /* this is from thoth@shark.cis.ufl.edu (Robert Forsman) */ XClientMessageEvent xev; BLOCK_INPUT_DECLARE (); check_xterm(); xev.type = ClientMessage; xev.send_event = True; xev.window = XXwindow; xev.format = 32; xev.data.l[0] = IconicState; BLOCK_INPUT (); xev.message_type = XInternAtom(XXdisplay,"WM_CHANGE_STATE",False); XSendEvent(XXdisplay, DefaultRootWindow(XXdisplay), False, SubstructureRedirectMask|SubstructureNotifyMask, &xev); UNBLOCK_INPUT (); XFlush(XXdisplay); } return Qnil; } ================ Add to function syms_of_xfns of x11fns.c: ================ defsubr (&Sx_iconify_window); ================ That's all. -- 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 62911/62500 ------------------------ "Arms are made for hugging" -------------------------