Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!think!bloom-beacon!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: Detecting/Compressing Multiple Exposure Events - how ? Message-ID: <19880831125525.6.RWS@KILLINGTON.LCS.MIT.EDU> Date: 31 Aug 88 12:55:00 GMT References: <126@tityus.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 17 Date: 30 Aug 88 17:54:08 GMT From: vsi1!daver!athsys!jim@AMES.ARC.NASA.GOV (Jim Becker) Is there some method to determine globally if an exposure event (or any given event/window combination) is the last such event, with only scanning of the event queue taking place ?? Yes, just think a little creatively. XCheckIfEvent takes a predicate and a "char *arg". Rather than using the Bool return from XCheckIfEvent to indicate if you have a matching event, store the outcome in the arg instead, and always return False from the predicate (so that XCheckIfEvent doesn't remove any events). To get the effect of "stopping early", your predicate will need to check the stored outcome in the arg and do nothing when it is already True (or whatever status you are looking for). Yes, this means you execute a bit more code, but somehow I doubt your event queues should be long enough for that to really matter.