Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!stan!marvin!toml From: toml@marvin.Solbourne.COM (Tom LaStrange) Newsgroups: comp.windows.x Subject: Can you XMapWindow and XSetInputFocus ? Message-ID: Date: 30 May 91 20:23:55 GMT Article-I.D.: marvin.TOML.91May30152355 Sender: toml@solbourne.com (Tom LaStrange) Organization: Solbourne Computer, Inc. Lines: 28 Oh combined wisdom of the net, please solve my problem... For the sake of simplicity, let's assume that the window manager will NOT iconify my window when it is mapped. Say I have a top-level window that has the input focus. I want to map another top-level window and set input focus to it. I want to do something like this: MapTheWindow(window); SetTheFocus(window); I do not want MapTheWindow to return until I can set input focus to the window, it and all of it's ancestors must be mapped. MapTheWindow cannot simply wait for a MapNotify event because the window manager may map the client window and then sometime later map its frame. In between, input focus cannot be set because an ancestor of the window is unmapped. MapTheWindow cannot wait for a VisibilityNotify event because the window may be completely obscured. It cannot wait for Expose events for the same reason. What I really want is an event that tracks the state of the map_state member of the XWindowAttributes structure. I hope I've overlooked something. Can you solve this problem? Thanks, (I kid you not)Tom LaStrange toml@Solbourne.COM