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. Cheers, Magnus
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
