Find a file
Peter Hutterer 9f225f8ea5 evdev: remove a race condition opening the wrong device
Potential race condition:
- udev notifies us that a udev_device became available
- we go for a coffee and chat to the neighbours on the way
- the device is unplugged
- a new device is plugged in, gets the same devnode
- we finish our coffee and come back
- open(udev_device_get_devnode())
- new device is now opened as the old device

To avoid the above race, we compare the syspath of the device at the open fd
with the syspath of the device we originally wanted. If they differ, we fail.

evdev_compare_syspath was simply moved up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-11-25 16:34:22 +10:00
doc doc: update for latest doxygen 2014-10-30 15:16:40 +10:00
include/linux evdev: Add middle button scrolling for trackpoints 2014-09-18 13:29:42 +10:00
m4 Port evdev code to be used as a shared library 2013-11-12 22:37:20 +01:00
src evdev: remove a race condition opening the wrong device 2014-11-25 16:34:22 +10:00
test path: store the udev device instead of just the devnode 2014-11-25 16:33:01 +10:00
tools Rename scroll_mode to scroll_method 2014-11-24 10:58:23 +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.6 2014-09-11 22:32:51 +02: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/