diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index fdc53192..96e78b94 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; @@ -1018,7 +1017,6 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct tp_touch *t) static void tp_process_state(struct tp_dispatch *tp, uint64_t time) { - struct evdev_device *device = tp->device; struct tp_touch *t; unsigned int i; bool restart_filter = false; @@ -1044,10 +1042,6 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) if (!t->dirty) continue; - if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) && - 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), @@ -2124,12 +2118,6 @@ tp_init_hysteresis(struct tp_dispatch *tp) { int res_x, res_y; - tp->hysteresis_margin.x = 0; - tp->hysteresis_margin.y = 0; - - if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD) - return; - res_x = tp->device->abs.absinfo_x->resolution; res_y = tp->device->abs.absinfo_y->resolution; tp->hysteresis_margin.x = res_x/2; diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index cbb9fb0e..3f3b728a 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/src/evdev.c b/src/evdev.c index 335c2386..b4a1088a 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1804,7 +1804,6 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(CYBORG_RAT), MODEL(CYAPA), MODEL(LENOVO_T450_TOUCHPAD), - MODEL(PRECISE_TOUCHPAD), MODEL(TRACKBALL), MODEL(APPLE_MAGICMOUSE), { NULL, EVDEV_MODEL_DEFAULT }, diff --git a/src/evdev.h b/src/evdev.h index d995985f..ca133181 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -114,7 +114,6 @@ enum evdev_device_model { EVDEV_MODEL_CYBORG_RAT = (1 << 14), EVDEV_MODEL_CYAPA = (1 << 15), EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), - EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18), EVDEV_MODEL_TRACKBALL = (1 << 19), EVDEV_MODEL_APPLE_MAGICMOUSE = (1 << 20), }; diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c index 9d4034db..23d9c5b4 100644 --- a/test/litest-device-synaptics-x1-carbon-3rd.c +++ b/test/litest-device-synaptics-x1-carbon-3rd.c @@ -121,7 +121,6 @@ static const char udev_rule[] = "\n" "ATTRS{name}==\"litest SynPS/2 Synaptics TouchPad X1C3rd\"," " ENV{LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD}=\"1\"\n" -" ENV{LIBINPUT_MODEL_PRECISE_TOUCHPAD}=\"1\"\n" "\n" "LABEL=\"touchpad_end\""; diff --git a/test/litest.c b/test/litest.c index cb98f7fa..d5e33dc6 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1503,28 +1503,6 @@ litest_touch_move_extended(struct litest_device *d, litest_slot_move(d, slot, x, y, axes, true); } -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) -{ - 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); - 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, @@ -1532,11 +1510,17 @@ litest_touch_move_to(struct litest_device *d, 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); + for (int i = 0; i < steps - 1; i++) { + 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(d, slot, x_to, y_to); } static int diff --git a/test/litest.h b/test/litest.h index 98419186..c8309285 100644 --- a/test/litest.h +++ b/test/litest.h @@ -412,13 +412,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 0b1cd0e9..5c632029 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -3650,7 +3650,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); } @@ -3980,72 +3980,6 @@ START_TEST(touchpad_tool_tripletap_touch_count) } END_TEST -START_TEST(touchpad_t450_motion_drops) -{ - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; - struct libinput_event *event; - struct libinput_event_pointer *ptrev; - int i; - double d; - - /* In some areas on the touchpad we only get pressure events. - * https://bugs.freedesktop.org/show_bug.cgi?id=94379 - */ - litest_drain_events(li); - - litest_touch_down(dev, 0, 50, 50); - - for (i = 0; i < 10; i++) { - litest_event(dev, EV_ABS, ABS_MT_SLOT, 0); - litest_event(dev, EV_ABS, ABS_MT_POSITION_X, 3000 - i); - litest_event(dev, EV_ABS, ABS_MT_POSITION_Y, 3000 - i); - litest_event(dev, EV_ABS, ABS_MT_PRESSURE, 30); - litest_event(dev, EV_ABS, ABS_X, 3000 - i); - litest_event(dev, EV_ABS, ABS_Y, 3000 - i); - litest_event(dev, EV_ABS, ABS_PRESSURE, 30); - litest_event(dev, EV_SYN, SYN_REPORT, 0); - litest_drain_events(li); - } - - /* several pressure-only events */ - - for (i = 0; i< 20; i++) { - litest_event(dev, EV_ABS, ABS_MT_PRESSURE, 30 + i % 2); - litest_event(dev, EV_ABS, ABS_PRESSURE, 30 + i % 2); - litest_event(dev, EV_SYN, SYN_REPORT, 0); - litest_assert_empty_queue(li); - } - - /* a 100 unit jump followed by fine-grained motion, we expect small - * motions without the jump */ - - for (i = 0; i < 10; i++) { - litest_event(dev, EV_ABS, ABS_MT_SLOT, 0); - litest_event(dev, EV_ABS, ABS_MT_POSITION_X, 3100 + i); - litest_event(dev, EV_ABS, ABS_MT_POSITION_Y, 3100 + i); - litest_event(dev, EV_ABS, ABS_X, 3100 + i); - litest_event(dev, EV_ABS, ABS_Y, 3100 + i); - litest_event(dev, EV_ABS, ABS_PRESSURE, 30); - litest_event(dev, EV_SYN, SYN_REPORT, 0); - libinput_dispatch(li); - } - - event = libinput_get_event(li); - ck_assert_notnull(event); - while (event) { - ptrev = litest_is_motion_event(event); - d = libinput_event_pointer_get_dx(ptrev); - litest_assert_double_lt(d, 1.0); - d = libinput_event_pointer_get_dy(ptrev); - litest_assert_double_lt(d, 1.0); - libinput_event_destroy(event); - - event = libinput_get_event(li); - } -} -END_TEST - START_TEST(touchpad_time_usec) { struct litest_device *dev = litest_current_device(); @@ -4236,7 +4170,6 @@ litest_setup_tests(void) litest_add("touchpad:thumb", touchpad_thumb_tap_hold_2ndfg_tap, LITEST_CLICKPAD, LITEST_SINGLE_TOUCH); litest_add_for_device("touchpad:bugs", touchpad_tool_tripletap_touch_count, LITEST_SYNAPTICS_TOPBUTTONPAD); - litest_add_for_device("touchpad:bugs", touchpad_t450_motion_drops, LITEST_SYNAPTICS_TRACKPOINT_BUTTONS); litest_add("touchpad:time", touchpad_time_usec, LITEST_TOUCHPAD, LITEST_ANY); diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index ca86d1e8..5e5ea9ab 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -32,7 +32,6 @@ libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800 libinput:touchpad:input:b0003v05ACp* libinput:touchpad:input:b0005v05ACp* LIBINPUT_MODEL_APPLE_TOUCHPAD=1 - LIBINPUT_MODEL_PRECISE_TOUCHPAD=1 LIBINPUT_ATTR_SIZE_HINT=104x75 libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* @@ -106,7 +105,6 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*: libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*: libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:* LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 - LIBINPUT_MODEL_PRECISE_TOUCHPAD=1 ########################################## # Logitech