[PATCH libinput v3 03/17] touchpad: reset the tap timer_fd to -1 on destroy

Hans de Goede hdegoede at redhat.com
Tue May 20 07:34:51 PDT 2014


From: Peter Hutterer <peter.hutterer at who-t.net>

No real effect, just for safety

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Reviewed-by: Jonas Ådahl <jadahl at gmail.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
---
 src/evdev-mt-touchpad-tap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c
index 5fa712f..bcc5700 100644
--- a/src/evdev-mt-touchpad-tap.c
+++ b/src/evdev-mt-touchpad-tap.c
@@ -615,6 +615,8 @@ tp_destroy_tap(struct tp_dispatch *tp)
 		libinput_remove_source(tp->device->base.seat->libinput, tp->tap.source);
 		tp->tap.source = NULL;
 	}
-	if (tp->tap.timer_fd > -1)
+	if (tp->tap.timer_fd > -1) {
 		close(tp->tap.timer_fd);
+		tp->tap.timer_fd = -1;
+	}
 }
-- 
1.9.0



More information about the wayland-devel mailing list