Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!agate!shelby!portia.stanford.edu!nova.stanford.edu!ceg From: ceg@nova.stanford.edu (Chris Gronbeck) Newsgroups: comp.windows.x Subject: Help with sending events to non-existent windows Keywords: errors Message-ID: <1990Jul2.192334.24507@portia.Stanford.EDU> Date: 2 Jul 90 19:23:34 GMT Sender: news@portia.Stanford.EDU (USENET News System) Reply-To: ceg@nova.stanford.edu (Chris Gronbeck) Organization: Stanford University, Stanford CA Lines: 14 I have a program that maintains a list of windows that it sends data to using XSendEvent. If a user terminates a process with ^c that has a window attached to it, the first program crashes with a BadWindow error. The things I have tried are using XSetErrorHandler to nonfatal, which didn't do anything (still printed out standard message and exitted) and using XQueryTree to check make sure window numbers are valid, but windows were killed and the first program crashed before the XQueryTree found out that the window no longer existed. Any suggestions would be greatly appreciated. Christopher Gronbeck ceg@nova.stanford.edu