Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!uflorida!bikini!thoth From: thoth@reef.cis.ufl.edu (Gilligan) Newsgroups: comp.windows.x Subject: Re: Self-Iconification and Emacs Message-ID: Date: 29 Sep 90 16:08:10 GMT References: Sender: news@uflorida.cis.ufl.EDU Organization: Zik Zak Lines: 77 In-reply-to: meissner@osf.org's message of 29 Sep 90 00:23:58 GMT We don't have that x-set-WM-state either. I had to write my own iconification procedure. (this was before I knew about the Xlib convenience function XIconifyWindow). *** x11oldfns.c Tue Oct 10 04:04:50 1989 --- x11bobfns.c Thu Jun 28 19:31:12 1990 *************** *** 828,833 **** --- 828,879 ---- return (Qnil); } + DEFUN ("x-iconify", Fx_iconify, Sx_iconify, 0, 0, "", + "this iconifies the emacs window.") + () + { + 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 Qt; + } + + + DEFUN ("x-deiconify", Fx_deiconify, Sx_deiconify, 0, 0, "", + "this de-iconifies the emacs window.") + () + { + BLOCK_INPUT_DECLARE (); + check_xterm(); + BLOCK_INPUT (); + + XMapWindow(XXdisplay,XXwindow); + + UNBLOCK_INPUT (); + + XFlush(XXdisplay); + + return Qt; + } + XRedrawDisplay () { Fredraw_display (); *************** *** 892,897 **** --- 938,945 ---- defsubr (&Sx_rebind_keys); #endif notdef defsubr (&Sx_debug); + defsubr (&Sx_iconify); + defsubr (&Sx_deiconify); } #endif /* HAVE_X_WINDOWS */ -- -- "Until it's on my desk, it's vaporware" (`it' is the NeXT)