Extra pointer motion with current git xf86-input-synaptics

Simon Thum simon.thum at gmx.de
Sun Sep 28 10:26:06 PDT 2008


Peter Hutterer wrote:
> On Sun, Sep 28, 2008 at 08:23:51AM +0100, Magnus Kessler wrote:
>> I have just reverted the part of commit  
>> c405a69f83dab77cfe6c76f718a3ca5614a85918 that passes the actual x/y ranges 
>> to xf86InitValuatorAxisStruct. Now the extra movement is gone, but I get a 
>> somewhat quicker cursor movement than I was used to before. This would be 
>> due to the other recent changes that set new default values for the 
>> acceleration parameters, of course.
The problem is more that in the synaptics case, there are two chained 
accel mechanisms, which should be taken care of before 1.6. The accel 
changes so far should hardly be noticeable (yes, that's the feature).

>> I'm trying to see where in the valuators are actually used inside the X 
>> server. With a smaller range than [0, -1] some rounding error (?) seems to 
>> create that extra pixel offset for each event processed. This is on a 
>> 64-bit platform, in case this is important.
> 
> 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.



More information about the xorg mailing list