Trivial change to mouse acceleration code would make it less bad

Simon Strandman simon.strandman at telia.com
Wed Oct 27 12:17:45 PDT 2004


Would it be possible to take the mouse-acceleration code from kdrive and
adapt it to xorg? kdrive has much nicer mouse-acceleration IMHO.


> Hello.
> 
> I read the mouse acceleration code in xf86Xinput.c and noticed that 
> there are 2 different formulas depending on whether threshold is 0 or 
> not. The formula for threshold != 0 applies the standard method of 
> acceleration while the one for 0 applies an exponential one.
> 
> Now I personally don't like any kind of mouse acceleration but the 
> exponential method uses the variables dxremaind and dyremaind to prevent 
> accumulation of rounding errors which is a very good idea.
> 
> When a user has a mouse with a high resolution, he might want to use for 
> example "xset m 1/2 1" to halve the pointer speed but with the current 
> implementation this makes the pointer stall when the mouse is moved 
> slowly. (In this case, "xset m 1 0" could have been used for the wanted 
> effect but this is a coincidence.)
> 
> That's why I suggest that the old acceleration code uses the 
> dxremaind/dyremaind variables, too.
> 
> Long term, the method proposed by Eugenia [1] look promising although 
> I'm against scaling the pointer movement according to screen resolution 
> but short term, my proposed change would allow freely scaling the mouse 
> speed without the mentioned problem and without breaking any 
> compatibility (I hope).
> 
> [1] http://freedesktop.org/bugzilla/show_bug.cgi?id=138
> 
-- 
Simon Strandman <simon.strandman at telia.com>




More information about the xorg mailing list