Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Finding out if you're Iconified Message-ID: <9009201130.AA06022@Larry.McRCIM.McGill.EDU> Date: 20 Sep 90 11:30:23 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 47 >> I need to find out if my application is iconified (either by the >> user or automatically by another program), or actually being >> displayed on the screen. Those are not the only possibilities. For example, it could be uniconified but completely off-screen (with tvtwm and other "virtual desktop" window managers, this is even likely). > I also thought that the VisibilityNotify event might do what you > want, however the "unobscured" event is generated when uniconifying, > but the "obscured" event is not when iconifying. Humhhhh, I wonder > if this is a bug? Does iconfication qualify as "obscured?" From the Xlib document: 8.4.6.10. VisibilityNotify Events The X server can report VisibilityNotify events to clients wanting any change in the visibility of the specified window. A region of a window is visible if someone looking at the screen can actually see it. ... The X server ignores all of a window's subwindows when determining the visibility state of the window and processes VisibilityNotify events according to the following: o When the window changes state from partially obscured, fully obscured, or not viewable to viewable and completely unobscured, [...] VisibilityUnobscured. o When the window changes state from viewable and completely unobscured or not viewable to viewable and partially obscured, [...] VisibilityPartiallyObscured. o When the window changes state from viewable and completely unobscured, viewable and partially obscured, or not viewable to viewable and fully obscured, [...] VisibilityFullyObscured. Nothing about changes to non-viewable states, so no, it's not a bug. IMO it's a misfeature, though. Unmapping certainly changes a window's visibility, as defined in the first paragraph quoted above. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu