Find a file
Hans de Goede 36017fbd3c touchpad: Use remove callback to unlink event listener and stop timers
We use 2 mechanisms to unregister the trackpoint event listener depending on
device removal order.

1) We have a device_removed callback, if the trackpoint gets removed before
the touchpad, this gets called, sees the device being removed is the trackpoint
and unregisters the listener

2) If the touchpad gets removed first, then in tp_destroy we unregister the
listener

2) May be delayed beyond the destruction of the trackpoint itself if the
libinput user has a reference to the libinput_device for the touchpad.
When this happens the trackpoint still has an eventlistener at destroy time
and an assert triggers.

To fix this we must do 2) at the same time as we do 1), so at remove time.

While working on this I noticed that the touchpad code was also cancelling
timers at destroy time rather then remove time, which means that they may
expire between remove and destroy time, and cause events to be emitted from
a removed device, so this commit moves the cancelling of the timers to the
remove callback as well.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-09 09:55:36 +01:00
doc touchpad: Add edge-scrolling support 2014-11-25 17:02:30 +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 touchpad: Use remove callback to unlink event listener and stop timers 2014-12-09 09:55:36 +01:00
test Split libinput-util into a noinst helper library 2014-12-05 14:04:08 +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.7 2014-12-05 14:04:22 +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 README: link to bugzilla and API docs 2014-12-09 14:11:21 +10: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/

Bugs can be filed in the libinput component of Wayland:
https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland

Online API documentation:
http://wayland.freedesktop.org/libinput/doc/latest/modules.html