Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: XCheckWindowEvent with ButtonMotionMask Message-ID: <8907051246.AA08809@expire.lcs.mit.edu> Date: 5 Jul 89 12:46:08 GMT References: <1587@cfa241.cfa250.harvard.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 17 Simply put: when a window has PointerMotionMask in its event mask, XCheckWindowEvent(.., ButtonMotionMask, ) returns all MotionNotify events, including those after the Button was released. Is this a bug which will be fixed in the next release, or does it reflect a design philosophy? How about "a realistic limitation"? Note that a pointer can have more than 5 buttons, so a button can be down without that fact being noted in the event structure (the state mask doesn't have a "some button is down" bit). As such, XCheckWindowEvent plays it safe and assumes all MotionNotify events might have been generated while some button was down. (It's not obvious whether this is a better or worse assumption than doing it the other way, but that's the way it is.) If you know which button (between 1 and 5) is down, then you can simply call XCheckWindowEvent with the specific ButtonMotionMask instead and get the behaviour you desire.