Add an API to change pointer acceleration profiles
The quartett of new config functions is: libinput_device_config_accel_get_profiles libinput_device_config_accel_get_profile libinput_device_config_accel_set_profile libinput_device_config_accel_get_default_profile The profile defines how the pointer acceleration works, from a very high-level perspective. Two profiles are on offer, "adaptive", the standard one we have used so far and "flat" which is a simple multiplier of input deltas and provides 1:1 mapping of device movement vs pointer movement. The speed setting is on top of the profile, a speed of 0 (default) is the equivalent to "no pointer acceleration". This is popular among gamers and users of switchable-dpi mice. The flat profile unnormalizes the deltas, i.e. you get what the device does and any device below 800dpi will feel excruciatingly slow. The speed range [-1, 1] maps into 0-200% of the speed. At 200%, a delta of 1 is translated into a 2 pixel movement, anything higher makes it rather pointless. The flat profile is currently available for all pointer devices but touchpads. https://bugs.freedesktop.org/show_bug.cgi?id=89485 Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
Showing
- doc/pointer-acceleration.dox 17 additions, 0 deletionsdoc/pointer-acceleration.dox
- src/evdev-mt-touchpad.c 39 additions, 1 deletionsrc/evdev-mt-touchpad.c
- src/evdev.c 92 additions, 26 deletionssrc/evdev.c
- src/filter-private.h 1 addition, 0 deletionssrc/filter-private.h
- src/filter.c 97 additions, 2 deletionssrc/filter.c
- src/filter.h 5 additions, 0 deletionssrc/filter.h
- src/libinput-private.h 6 additions, 0 deletionssrc/libinput-private.h
- src/libinput.c 46 additions, 1 deletionsrc/libinput.c
- src/libinput.h 74 additions, 0 deletionssrc/libinput.h
- src/libinput.sym 7 additions, 0 deletionssrc/libinput.sym
- test/pointer.c 114 additions, 0 deletionstest/pointer.c
- tools/libinput-list-devices.c 33 additions, 0 deletionstools/libinput-list-devices.c
- tools/shared.c 23 additions, 1 deletiontools/shared.c
- tools/shared.h 1 addition, 0 deletionstools/shared.h
Loading
Please register or sign in to comment