libinput/src
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
..
evdev-mt-touchpad-buttons.c touchpad: Use remove callback to unlink event listener and stop timers 2014-12-09 09:55:36 +01:00
evdev-mt-touchpad-edge-scroll.c touchpad: Use remove callback to unlink event listener and stop timers 2014-12-09 09:55:36 +01:00
evdev-mt-touchpad-tap.c touchpad: Use remove callback to unlink event listener and stop timers 2014-12-09 09:55:36 +01:00
evdev-mt-touchpad.c touchpad: Use remove callback to unlink event listener and stop timers 2014-12-09 09:55:36 +01:00
evdev-mt-touchpad.h touchpad: Use remove callback to unlink event listener and stop timers 2014-12-09 09:55:36 +01:00
evdev.c evdev: Add a remove callback to the evdev_dispatch_interface 2014-12-09 09:55:36 +01:00
evdev.h evdev: Add a remove callback to the evdev_dispatch_interface 2014-12-09 09:55:36 +01:00
filter-private.h filter: add a configurable speed interface 2014-09-23 10:46:22 +10:00
filter.c filter: perform speed computations with doubles 2014-10-31 14:12:19 +10:00
filter.h Change default DPI to 1000 2014-12-02 10:16:31 +10:00
libinput-private.h Introduce unaccelerated motion event vectors 2014-12-05 11:54:02 +10:00
libinput-util.c evdev: Query mouse DPI from udev 2014-12-02 10:16:31 +10:00
libinput-util.h evdev: Query mouse DPI from udev 2014-12-02 10:16:31 +10:00
libinput-version.h.in Port evdev code to be used as a shared library 2013-11-12 22:37:20 +01:00
libinput.c Introduce unaccelerated motion event vectors 2014-12-05 11:54:02 +10:00
libinput.h doc: fix wording on the dpi normalization paragraph 2014-12-09 14:10:21 +10:00
libinput.pc.in Add -lrt to the libs 2014-07-03 09:59:43 +10:00
Makefile.am Split libinput-util into a noinst helper library 2014-12-05 14:04:08 +10:00
path.c Add libinput_device_set_seat_logical_name() to change seats at runtime 2014-11-25 16:34:22 +10:00
path.h path: store the udev device instead of just the devnode 2014-11-25 16:33:01 +10:00
timer.c Add a helper function for clock_gettime 2014-09-18 11:30:15 +10:00
timer.h timer.h: Add #include libinput-util.h 2014-06-11 10:30:12 +10:00
udev-seat.c udev: only apply default calibration on absolute devices 2014-12-05 14:04:18 +10:00
udev-seat.h udev: Drop unused seat_name in struct udev_seat 2014-01-16 20:42:30 +01:00