Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!SUN.COM!dshr From: dshr@SUN.COM (David Rosenthal) Newsgroups: comp.windows.x Subject: Re: help Message-ID: <8802062352.AA24340@devnull.sun.com> Date: 6 Feb 88 20:36:33 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 39 > You can find out whether your window is mapped or not via Xlib's > XGetWindowAttributes request. Being unmapped is not, strictly speaking, > exactly the same thing as being iconized. However, if you're inquiring > about a top level window mapped by you (by some request or toolkit > operation in your program), but never unmapped by you, it's a safe bet > that the window manager unmapped it. If all you want to know is whether > to refrain from drawing because your window's unmapped, this is a > winning strategy. This is misleading, not to say wrong. Almost all window managers will re-parent your top-level window to be a child of a window belonging to the window manager. When the WM iconifies you, it will unmap its own window, causing your top-level to be mapped but unviewable (because its parent is unmapped). Thus, you will never find your top-level unmapped, even when you are iconic. With R2, there will be a manual called the "Inter-Client Communications Conventions Manual". Although it will still be a draft, it will be pretty close to the way things will eventually turn out. It explains how to find out if you are iconic reliably (examine the WM_STATE property on your top-level window, window managers must maintain this and you can get PropertyNotify events on it when they change it). There is much more in the manual (its currently 22 pages) about how you relate to window managers and also to the selection service. Unfortunately, it will take time for these conventions to be finalized and blessed, and more time still for existing window managers, toolkits, and so on to be upgraded to adhere to them. In the meantime, things will be frustrating because there may be no clear recommendation on what to do, or because there is a clear recommendation but it doesn't work yet. In some cases, resolving these problems involves experimentation, because the implications of some of these conventions in circumstances like the window manager crashing are difficult to predict. We are trying to resolve these problems as fast as possible, and in the meantime we are supplying the manual in draft form to explain what is already pretty certain. Many of these issues were thrashed out in a sideline meeting at the recent X conference. David.