Extra pointer motion with current git xf86-input-synaptics
Magnus.Kessler at gmx.net
Sun Sep 28 12:23:09 PDT 2008
On Sunday 28 September 2008, Simon Thum wrote:
> Peter Hutterer wrote:
> > Check out GetPointerEvents in xserver/dix/getevents.c.
> > We take valuator coordinates, scale them to screen coords based on the
> > axis information and then scale them back to device coords*.
> > The screen coords are used to move the cursor and the scaling is done
> > based on the axis ranges. Hence the different acceleration when you
> > change the axis range to 0,-1 (in which case the screen coords are used
> > as axis ranges).
> To me, this case sounds like a rounding error piling up.
> What about:
> rescaleValuatorAxis(int coord, AxisInfoPtr from, AxisInfoPtr to,
> int defmax)
> return (int)(((float)(coord - fmin) + 0.5f) * (tmax - tmin + 1) /
> (fmax - fmin + 1)) + tmin;
> in getevents.c. This may take out the trend you're observing.
Thanks, Simon. That change does indeed solve my problem.
For the record: By instrumenting the driver with xf86Msg calls as Peter
suggested I have verified that the synaptics driver only calls
xf86PostMotionEvent when the touchpad was actually touched. Yet I was
seeing the cursor move even when xf86PostButtonEvent was called after
clicking the physical buttons.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 197 bytes
Desc: This is a digitally signed message part.
More information about the xorg