Not receiving XI_RawMotion events while mouse button is pressed.

Roger Cruz roger.cruz at virtualcomputer.com
Tue May 10 12:25:17 PDT 2011



I have integrated libxi2's capability to provide raw motion pointer values into my application which was originally using (and still uses) xinput events.  The application currently registers for the old xinput events using XSelectInput.  

	XSelectInput(xs->dpy, xs->w, event_mask);

where the event mask is

	event_mask = (OwnerGrabButtonMask << 1) - 1;	/* all events */

	event_mask &= ~PointerMotionHintMask;
	event_mask &= ~PropertyChangeMask;
	event_mask &= ~ColormapChangeMask;
	event_mask &= ~SubstructureNotifyMask;


I added an additional xinput2 registration to only capture the raw motion events which I needed.

	XISetMask(eventmask->mask, XI_RawMotion);
	XISelectEvents(xs->dpy, DefaultRootWindow(xs->dpy), eventmask, 1);

This appears to be working fine.  I get raw motion and mouse button press and releases when done independently.  However, when I click to drag, I only get the button press event but not the raw motion events.  Is this expected behavior for the current implementation of libxi?  I need to be able to get raw motion events even when the button is pressed.  I don't believe anyone else is grabbing the pointer.

Thanks
Roger R. Cruz


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20110510/575d7f0a/attachment.html>


More information about the xorg mailing list