XI2 relative motion events documentation

Daniel Stone daniel at fooishbar.org
Tue Oct 19 08:49:02 PDT 2010


On Fri, Oct 15, 2010 at 11:57:48PM -0500, Rendaw wrote:
>  I played around with the valuator data a bit.  In a XI_RawMotion
> event, the valuators.values and corresponding raw_values both return
> relative motion data, but they are way different.  I'm not sure by
> how much exactly, but for my mouse the raw_values were several
> orders of magnitude smaller.  However, the valuators.values were in
> turn smaller than the actual cursor coordinate changes, usually by
> about half, although sometimes (randomly, even at larger values)
> they were equal.
> 
> Also perhaps of note, only the slave device reported raw events when
> there was the WM's passive grab (when I had a button down) in place.
> Only the master device reported raw events otherwise.  I'm not sure
> what to make of that, although I guess it makes my life easier for
> now.
> 
> Anyways, the valuator data is better than nothing, but I'm not sure
> how to interpret it if it is neither the final motion data nor the
> raw motion data.

You need to get the device class info; the valuator class has minimum
and maximum values you need to use to scale the raw valuators to screen
co-ordinates, as well as its resolution.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101020/aed218ab/attachment-0001.pgp>


More information about the xorg-devel mailing list