summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/evdev-fallback.c6
-rw-r--r--src/evdev-mt-touchpad.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c
index 7dad0fce..22dfb1b6 100644
--- a/src/evdev-fallback.c
+++ b/src/evdev-fallback.c
@@ -1012,6 +1012,9 @@ fallback_interface_remove(struct evdev_dispatch *evdev_dispatch)
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
struct evdev_paired_keyboard *kbd, *tmp;
+ libinput_timer_cancel(&dispatch->debounce.timer);
+ libinput_timer_cancel(&dispatch->debounce.timer_short);
+
libinput_device_remove_event_listener(&dispatch->tablet_mode.other.listener);
list_for_each_safe(kbd,
@@ -1081,10 +1084,9 @@ fallback_interface_destroy(struct evdev_dispatch *evdev_dispatch)
{
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
- libinput_timer_cancel(&dispatch->debounce.timer);
libinput_timer_destroy(&dispatch->debounce.timer);
- libinput_timer_cancel(&dispatch->debounce.timer_short);
libinput_timer_destroy(&dispatch->debounce.timer_short);
+
free(dispatch->mt.slots);
free(dispatch);
}
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 03ea9b38..5554c0bd 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -1782,6 +1782,8 @@ tp_interface_remove(struct evdev_dispatch *dispatch)
{
struct tp_dispatch *tp = tp_dispatch(dispatch);
+ libinput_timer_cancel(&tp->arbitration.arbitration_timer);
+
tp_remove_tap(tp);
tp_remove_buttons(tp);
tp_remove_sendevents(tp);
@@ -1794,7 +1796,6 @@ tp_interface_destroy(struct evdev_dispatch *dispatch)
{
struct tp_dispatch *tp = tp_dispatch(dispatch);
- libinput_timer_cancel(&tp->arbitration.arbitration_timer);
libinput_timer_destroy(&tp->arbitration.arbitration_timer);
libinput_timer_destroy(&tp->palm.trackpoint_timer);
libinput_timer_destroy(&tp->dwt.keyboard_timer);