mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 21:00:06 +01:00
read-only mirror of https://gitlab.freedesktop.org/libinput/libinput
I doubt this does what we think it does. It doesn't soften the delta changes, rather it introduces bumps in the smooth processing of the changes. abs(delta) below 1.0 is untouched, and abs(delta) beyond 3 or 4 isn't noticable much. But in the slow range around the 1/-1 mark there is a bump. For example, if our last_delta is 1.0 and delta is 1.1, the "softened" delta is set to 0.6. That is stored as last delta, so an input sequence of: 0.8, 0.9, 1.0, 1.1, 1.2, 1.0, 0.8, 1.1 results in "softened" deltas that don't match the input: 0.8, 0.9, 1.0, 0.6, 0.7, 1.0, 0.8, 0.6 A better approach at smoothing this out would be to calculate the softened as: current = current ± diff(last, current) * 0.5 or even weighted towards the new delta current = current ± diff(last, current) * 0.25 In tests, this makes little difference. Dropping this function altogether is sufficient to make the pointer pointer behave slightly better at low speeds though the increase is small enough to attribute to confirmation bias. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> |
||
|---|---|---|
| doc | ||
| include/linux | ||
| m4 | ||
| src | ||
| test | ||
| tools | ||
| .gitignore | ||
| autogen.sh | ||
| configure.ac | ||
| COPYING | ||
| Makefile.am | ||
| README | ||
libinput libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code the user of libinput need to provide the common set of functionality that users expect. Input event processing includes scaling touch coordinates, generating pointer events from touchpads, pointer acceleration, etc. libinput originates from weston, the Wayland reference compositor. The source code of libinput can be found at: http://cgit.freedesktop.org/wayland/libinput For more information, visit: http://www.freedesktop.org/wiki/Software/libinput/