Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!jim From: jim@EXPO.LCS.MIT.EDU (Jim Fulton) Newsgroups: comp.windows.x Subject: Re: XGetWindowAttributes: documentation/reality clash Message-ID: <8904242147.AA11700@expo.lcs.mit.edu> Date: 24 Apr 89 21:47:09 GMT References: <8904240439.AA12537@Larry.McRCIM.McGill.EDU> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 16 The Xlib document is a little misleading. The routines in section 4.1 (titled "Obtaining Window Information", pages 62-67 in Scheifler, Gettys, and Newman) still require you to have an error handler (which you always need in critical applications, especially window managers). Since these routines normally only return an error when there is an invalid window or drawable identifier (well, not quite: BadAlloc could crop up but your client would probably be hosed shortly), your handler simply needs to not crap out in order for your calling program to get a Status of 0 or a Bool of False. > What *is* the proper way to tell whether a window still exists? Select for SubstructureNotify on the root and keep track of DestroyNotify events. Or else, just use one of the routines mentioned above once you've written your error handler! :-)