Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!mit-eddie!bloom-beacon!dont-send-mail-to-path-lines From: rws@expo.lcs.mit.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Possible Event Handler Bug Message-ID: <9101122032.AA28066@expire.lcs.mit.edu> Date: 12 Jan 91 20:32:33 GMT References: <9101122029.AA08824@kiwi.lgc.com> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 20 The problem here is the implicit pointer grab that the server starts when the pointer button goes down (see 8.4.1.1 of the Scheifler/Gettys/Newman book). Good work! I was just about to send a message saying the same thing. 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);