Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!decwrl!csus.edu!csusac!unify!openlook!openlook-request From: Stuart.Marks@Eng.Sun.COM (Stuart Marks) Newsgroups: comp.windows.open-look Subject: Re: Closing Autonomous Windows Message-ID: Date: 15 Jun 91 01:19:11 GMT Sender: news@Unify.Com Lines: 28 Now, I presume that (one way) I can get the window ID of an autonomous window is to have my application cal XGrabPointer, and then clicking on the target window. It seems that I could then call XIconifyWindow and thus close it. The routine returns a code indicating success in sending the message, but nothing happens. The problem is that the window has been reparented. I assume that you're looking at the subwindow field of the button click event. This window will be the window manager's frame window, not the client's top-level window. In order for XIconifyWindow() to work, it must be called with the client's top-level window, not the window manager's window. A simple way to find the client's top-level window given the window manager frame is to call XmuClientWindow(dpy, frame); it will return the ID of the client's top-level window. To use it, include in your program and link with -lXmu. Unfortunately, we don't ship the Xmu library with OpenWindows 2, though perhaps we should have. You'll have to get it from the MIT distribution. s'marks Stuart W. Marks ARPA: smarks@eng.sun.com Windows & Graphics Software UUCP: sun!smarks Sun Microsystems, Inc.