<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: Not receiving XI_RawMotion events while mouse button is pressed.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>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. <BR>
<BR>
XSelectInput(xs->dpy, xs->w, event_mask);<BR>
<BR>
where the event mask is<BR>
<BR>
event_mask = (OwnerGrabButtonMask << 1) - 1; /* all events */<BR>
<BR>
event_mask &= ~PointerMotionHintMask;<BR>
event_mask &= ~PropertyChangeMask;<BR>
event_mask &= ~ColormapChangeMask;<BR>
event_mask &= ~SubstructureNotifyMask;<BR>
<BR>
<BR>
I added an additional xinput2 registration to only capture the raw motion events which I needed.<BR>
<BR>
XISetMask(eventmask->mask, XI_RawMotion);<BR>
XISelectEvents(xs->dpy, DefaultRootWindow(xs->dpy), eventmask, 1);<BR>
<BR>
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.<BR>
<BR>
Thanks<BR>
Roger R. Cruz<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>