libinput/src
Peter Hutterer 25c11afd9c filter: adjust acceleration curve depending on speed
The acceleration curve consists of four parts, in ascii-art 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.

This patch adjusts the curve based on a [-1, 1] range. For anything below 0,
the plateau is longer (i.e. accel kicks in at a higher speed), the second
incline is flatter (i.e. accel kicks in slower) and the max accel factor is
lower (i.e. maximum speed is slower). For anything above 0, the inverse is
true, acceleration kicks in earlier, harder and is faster in general. So the
default/min/max curves overlaid look something like this:
      ________ max
     | _______ default
    | /  _____ min
  _|_/_/
 /
/

Note that there's a limit to what ascii art can do...

Note that there are additional tweaks we can introduce later, such as
decreaseing the unaccelerated speed of the device (i.e. lowering the first
plateau).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-23 10:46:23 +10:00
..
evdev-mt-touchpad-buttons.c touchpad: Enlarge topbutton area a bit while the touchpad is disabled 2014-09-19 15:48:52 +10:00
evdev-mt-touchpad-tap.c touchpad: hook up sendevents configuration 2014-09-18 13:29:42 +10:00
evdev-mt-touchpad.c Replace pointer acceleration with a much simpler linear one 2014-09-23 10:46:22 +10:00
evdev-mt-touchpad.h touchpad: Enlarge topbutton area a bit while the touchpad is disabled 2014-09-19 15:48:52 +10:00
evdev.c Replace pointer acceleration with a much simpler linear one 2014-09-23 10:46:22 +10:00
evdev.h evdev: drop unused declaration evdev_proces_event 2014-09-22 10:59:34 +10:00
filter-private.h filter: add a configurable speed interface 2014-09-23 10:46:22 +10:00
filter.c filter: adjust acceleration curve depending on speed 2014-09-23 10:46:23 +10:00
filter.h filter: add a configurable speed interface 2014-09-23 10:46:22 +10:00
libinput-private.h Drop two semicolons after a macro definition 2014-09-22 15:20:51 +10:00
libinput-util.c Add a customizable log handler 2014-02-19 08:35:25 +10:00
libinput-util.h Add a helper function for clock_gettime 2014-09-18 11:30:15 +10:00
libinput-version.h.in Port evdev code to be used as a shared library 2013-11-12 22:37:20 +01:00
libinput.c Add a config interface for enabling/disabling event generation from a device 2014-09-18 11:31:14 +10:00
libinput.h Add a config interface for enabling/disabling event generation from a device 2014-09-18 11:31:14 +10:00
libinput.pc.in Add -lrt to the libs 2014-07-03 09:59:43 +10:00
Makefile.am filter: add a filter-private.h header file 2014-09-23 10:46:22 +10:00
path.c evdev: don't resume a removed device 2014-09-18 11:31:23 +10:00
path.h path: modify backend to allow for more than one device 2014-02-10 11:23:35 +10:00
timer.c Add a helper function for clock_gettime 2014-09-18 11:30:15 +10:00
timer.h timer.h: Add #include libinput-util.h 2014-06-11 10:30:12 +10:00
udev-seat.c evdev: don't resume a removed device 2014-09-18 11:31:23 +10:00
udev-seat.h udev: Drop unused seat_name in struct udev_seat 2014-01-16 20:42:30 +01:00