Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!usc!ucselx!bionet!agate!graft!scott From: scott@graft.Berkeley.EDU (Scott Silvey) Newsgroups: comp.windows.x Subject: Re: Possible Event Handler Bug Message-ID: <1991Jan14.222932.773@agate.berkeley.edu> Date: 14 Jan 91 22:29:32 GMT References: <9101122029.AA08824@kiwi.lgc.com> <9101122032.AA28066@expire.lcs.mit.edu> Sender: usenet@agate.berkeley.edu (USENET Administrator) Reply-To: scott@xcf.berkeley.edu Organization: UC Berkeley Experimental Computing Facility Lines: 26 rws@expo.lcs.mit.EDU (Bob Scheifler) writes: |>> I think if you call XChangeActivePointerGrab in your button press |>> event handler with a mask that includes PointerMotionMask and |>> ButtonReleaseMask, your problem will go away (but I haven't actually |>> run the test). |> |> I have. To do it right, you should also specify the time from the event in |> the call: |> ... |> XtAddEventHandler(canvas, PointerMotionMask, FALSE, motion, NULL); |> XChangeActivePointerGrab(XtDisplay(canvas), |> PointerMotionMask|ButtonReleaseMask, |> None, evt->xbutton.time); Thank you gentlemen for your prompt replies. This indeed corrects the problem. This seems a rather obscure fix to me (although I see why it is necessary). Is it an oversight that XtAddEventHandler doesn't already make this call? Or was it a design decision to omit it because XtAddEventHandler would then have to do specialized work based on the event mask it was called with? /-----------------------------------------------------------------------------\ | Scott Silvey | Bumper Sticker seen in ( VERY liberal ) Berkeley: | | scott@xcf.berkeley.edu | | | Flames to /dev/null. | "US OUT OF NORTH AMERICA!" | \-----------------------------------------------------------------------------/