Skip to content
Snippets Groups Projects
Commit 4913fd7a authored by Peter Hutterer's avatar Peter Hutterer
Browse files

Replace pointer acceleration with a much simpler linear one

We ran a userstudy, evaluating three different accel methods. Detailed results are
available at:
http://www.who-t.net/publications/hutterer2014_libinput_ptraccel_study.pdf



We found that there was little difference between the method we had in
libinput 0.6 and this three-line function. Users didn't really notice a
difference, but measured data suggests that it has slight advantages in some
use-cases.

The method proposed here is the one labeled "linear" in the paper, its profile
looks roughly like this:

        _____________
       /
  ____/
 /
/

where the x axis is the speed, y is the acceleration factor.
The first plateau is at the acceleration factor 1 (i.e. unaccelerated
movement), the second plateau is at the max acceleration factor. The threshold
in the code defines where and how long the plateau is.

Differences to the previous accel function:
- both inclines are linear rather than curved
- the second incline is less steep than the current method

From a maintainer's point-of-view, this function is significantly easier to
understand and manipulate than the previous one.

Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent fa363ed0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment