summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-04-27 14:12:11 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-04-28 15:11:30 +1000
commite461f21c5232baba105c0aaf17987e319143ba9d (patch)
tree1e97666e142ae62859ffe65be483e9bce037b5fd /src
parent8a626394c9d304358039aadd2086ef7025132157 (diff)
touchpad: fix the button timestamps for double/tripletap
Both events had the same timestamp but we have the timestamp from the original event - use it. https://bugs.freedesktop.org/show_bug.cgi?id=100796 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad-tap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c
index 29989c9..6c989d9 100644
--- a/src/evdev-mt-touchpad-tap.c
+++ b/src/evdev-mt-touchpad-tap.c
@@ -341,7 +341,10 @@ tp_tap_touch2_release_handle_event(struct tp_dispatch *tp,
tp_tap_clear_timer(tp);
break;
case TAP_EVENT_RELEASE:
- tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_PRESSED);
+ tp_tap_notify(tp,
+ tp->tap.first_press_time,
+ 2,
+ LIBINPUT_BUTTON_STATE_PRESSED);
tp_tap_notify(tp, time, 2, LIBINPUT_BUTTON_STATE_RELEASED);
tp->tap.state = TAP_STATE_IDLE;
break;
@@ -376,7 +379,10 @@ tp_tap_touch3_handle_event(struct tp_dispatch *tp,
case TAP_EVENT_RELEASE:
tp->tap.state = TAP_STATE_TOUCH_2_HOLD;
if (t->tap.state == TAP_TOUCH_STATE_TOUCH) {
- tp_tap_notify(tp, time, 3, LIBINPUT_BUTTON_STATE_PRESSED);
+ tp_tap_notify(tp,
+ tp->tap.first_press_time,
+ 3,
+ LIBINPUT_BUTTON_STATE_PRESSED);
tp_tap_notify(tp, time, 3, LIBINPUT_BUTTON_STATE_RELEASED);
}
break;