Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: XReparentWindow vs. ALL window managers Message-ID: <9004122050.AA15913@expire.lcs.mit.edu> Date: 12 Apr 90 20:50:41 GMT References: <1990Apr10.203116.25044@Solbourne.COM> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 14 Here's the real solution. I think it's something that every reparenting window manager is going to have to do. When you get the UnmapNotify event, do an XQueryTree on whatever window (typically your frame) you think should be the parent. If you don't find the window in the list of children, the window has been reparented someplace else and you shouldn't do an explicit reparent back to the root. There's a race condition unless the WM does a GrabServer for this. An alternative is that the client is required to notice that the window was reparented by the WM, and when it wants to know the window has been withdrawn, it must wait for the unmap notify and a subsequent reparent notify back to the root, before itself attempting to reparent.