Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: Checking for valid Window ID Message-ID: <3031@bacchus.dec.com> Date: 15 Mar 90 20:45:17 GMT References: <24321@uhnix1.uh.edu> Sender: news@decwrl.dec.com Reply-To: klee@decwrl.dec.com Distribution: na Organization: DEC Western Software Laboratory Lines: 15 In article <24321@uhnix1.uh.edu>, atmaram@csun11.cs.uh.edu (S. Atmaram) writes: > My program has the Window ID of a window on a remote display. I > wish to check whether or not the ID is valid (that is, whether the > window still exists), before doing an XSendEvent. You should send the event without checking. Install an error handler to catch any BadWindow errors indicating that the window no longer exists. Since X is shared and asynchronous, there is no guarantee that a window that existed when you did your check will still exist when you send the event. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee