mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 00:30:05 +01:00
read-only mirror of https://gitlab.freedesktop.org/libinput/libinput
Once we get beyond the: if (abs(diff) <= margin) return center; test, then diff is either > margin or < -margin, otherwise the test would have triggered. So the "return center + diff;" at the end will never be reached, and the "else if (diff < -margin)" can be turned into a simple "else". This commit does not just simplify tp_hysteresis, but (arguably more important) also makes it clearer to the reader what it does. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |
||
|---|---|---|
| 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/