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
_______________________________________________
[email protected]: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: [email protected]