Find a file
Hans de Goede 14ad471ff5 touchpad: Simplify tp_hysteresis
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>
2014-07-01 10:54:18 +10:00
doc udev: split libinput_udev context init into two functions 2014-06-23 15:39:08 +10:00
include/linux Add our own version of linux/input.h 2014-06-04 09:40:39 +10:00
m4 Port evdev code to be used as a shared library 2013-11-12 22:37:20 +01:00
src touchpad: Simplify tp_hysteresis 2014-07-01 10:54:18 +10:00
test test/Makefile.am: Also add LIBUDEV_CFLAGS to AM_CPPFLAGS 2014-06-28 22:40:54 +02:00
tools Merge branch 'master' of git+ssh://git.freedesktop.org/git/wayland/libinput 2014-06-25 13:37:02 +10:00
.gitignore Add the framework for a test suite 2014-01-10 14:17:06 +10:00
autogen.sh Port evdev code to be used as a shared library 2013-11-12 22:37:20 +01:00
configure.ac configure.ac: libinput 0.4 2014-06-25 13:37:59 +10:00
COPYING test: Test seat wide button and key count helpers 2014-04-23 00:07:40 +02:00
Makefile.am test: automatically run the tests against valgrind for leaks 2014-04-10 11:11:56 +10:00
README Update README 2014-02-26 19:50:37 +01:00

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/