diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-06-16 16:10:21 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-06-24 14:08:20 +1000 |
commit | 762e752899926568362ae73fdc40d2486d7c4a80 (patch) | |
tree | c6d9d11992703480919cc8b08083d01d0737a814 | |
parent | 7e3cfc261e29f0f49314820363692e05b9417f66 (diff) |
Revert "touchpad: reset the motion history on significant negative pressure changes"
We will reinstate the hysteresis for all devices making the negative
pressure check unncessary.
This reverts commit ef48c07a9600733e068a2a437a145862ba07fdab.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 89747d714356b5225592355d8ef1c83a59b2c5f7)
-rw-r--r-- | src/evdev-mt-touchpad.c | 4 | ||||
-rw-r--r-- | src/evdev-mt-touchpad.h | 1 | ||||
-rw-r--r-- | test/litest.c | 34 | ||||
-rw-r--r-- | test/litest.h | 7 | ||||
-rw-r--r-- | test/touchpad.c | 2 |
5 files changed, 10 insertions, 38 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 82379a87..9eac42e1 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -357,7 +357,6 @@ tp_process_absolute(struct tp_dispatch *tp, tp_end_sequence(tp, t, time); break; case ABS_MT_PRESSURE: - t->pressure_delta = e->value - t->pressure; t->pressure = e->value; t->dirty = true; tp->queued |= TOUCHPAD_EVENT_OTHERAXIS; @@ -990,9 +989,6 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) if (!t->dirty) continue; - if (t->pressure_delta < -7) - tp_motion_history_reset(t); - if (tp_detect_jumps(tp, t)) { if (!tp->semi_mt) log_bug_kernel(tp_libinput_context(tp), diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 1efe25c5..4b372f34 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -155,7 +155,6 @@ struct tp_touch { uint64_t millis; int distance; /* distance == 0 means touch */ int pressure; - int pressure_delta; struct { /* A quirk mostly used on Synaptics touchpads. In a diff --git a/test/litest.c b/test/litest.c index ab59b0ff..0c93dc8d 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1500,39 +1500,23 @@ litest_touch_move_extended(struct litest_device *d, } void -litest_touch_move_to_extended(struct litest_device *d, - unsigned int slot, - double x_from, double y_from, - double x_to, double y_to, - struct axis_replacement *axes, - int steps, int sleep_ms) +litest_touch_move_to(struct litest_device *d, + unsigned int slot, + double x_from, double y_from, + double x_to, double y_to, + int steps, int sleep_ms) { for (int i = 0; i < steps - 1; i++) { - litest_touch_move_extended(d, slot, - x_from + (x_to - x_from)/steps * i, - y_from + (y_to - y_from)/steps * i, - axes); + litest_touch_move(d, slot, + x_from + (x_to - x_from)/steps * i, + y_from + (y_to - y_from)/steps * i); if (sleep_ms) { libinput_dispatch(d->libinput); msleep(sleep_ms); libinput_dispatch(d->libinput); } } - litest_touch_move_extended(d, slot, x_to, y_to, axes); -} - -void -litest_touch_move_to(struct litest_device *d, - unsigned int slot, - double x_from, double y_from, - double x_to, double y_to, - int steps, int sleep_ms) -{ - litest_touch_move_to_extended(d, slot, - x_from, y_from, - x_to, y_to, - NULL, - steps, sleep_ms); + litest_touch_move(d, slot, x_to, y_to); } static int diff --git a/test/litest.h b/test/litest.h index 747512ee..d6de089e 100644 --- a/test/litest.h +++ b/test/litest.h @@ -409,13 +409,6 @@ litest_touch_move_to(struct litest_device *d, double x_from, double y_from, double x_to, double y_to, int steps, int sleep_ms); -void -litest_touch_move_to_extended(struct litest_device *d, - unsigned int slot, - double x_from, double y_from, - double x_to, double y_to, - struct axis_replacement *axes, - int steps, int sleep_ms); void litest_touch_move_two_touches(struct litest_device *d, diff --git a/test/touchpad.c b/test/touchpad.c index 11fe2cf1..c1799838 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -3594,7 +3594,7 @@ START_TEST(touchpad_thumb_edgescroll) libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); - litest_touch_move_to_extended(dev, 0, 99, 55, 99, 70, axes, 10, 0); + litest_touch_move_to(dev, 0, 99, 55, 99, 70, 10, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); } |