tp->semi_mt = libevdev_has_property(device->evdev, INPUT_PROP_SEMI_MT);
+ /* This device has a terrible resolution when two fingers are down,
+ * causing scroll jumps. The single-touch emulation ABS_X/Y is
+ * accurate but the ABS_MT_POSITION touchpoints report the bounding
+ * box and that causes jumps. So we simply pretend it's a single
+ * touch touchpad with the BTN_TOOL bits.
+ * See https://bugzilla.redhat.com/show_bug.cgi?id=1235175 for an
+ * explanation.
+ */
+ if (tp->semi_mt &&
+ (device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT)) {
+ tp->num_slots = 1;
+ tp->slot = 0;
+ tp->has_mt = false;
+ }
+
ARRAY_FOR_EACH(max_touches, m) {
if (libevdev_has_event_code(device->evdev,
EV_KEY,
{
uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE;
- /* some Synaptics semi-mt touchpads have a terrible 2fg resolution,
- * causing scroll jumps. For all other 2fg touchpads, we enable 2fg
- * scrolling */
- if (tp->ntouches >= 2 &&
- (tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT) == 0)
+ if (tp->ntouches >= 2)
methods |= LIBINPUT_CONFIG_SCROLL_2FG;
return methods;
int range = _i,
ntaps;
+ if (litest_is_synaptics_semi_mt(dev))
+ return;
+
litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
method = libinput_device_config_scroll_get_methods(device);
ck_assert(method & LIBINPUT_CONFIG_SCROLL_EDGE);
- if (libevdev_get_num_slots(evdev) > 1 &&
- !litest_is_synaptics_semi_mt(dev))
+ if (libevdev_get_num_slots(evdev) > 1)
ck_assert(method & LIBINPUT_CONFIG_SCROLL_2FG);
else
ck_assert((method & LIBINPUT_CONFIG_SCROLL_2FG) == 0);
- if (libevdev_get_num_slots(evdev) > 1 &&
- !litest_is_synaptics_semi_mt(dev))
+ if (libevdev_get_num_slots(evdev) > 1)
expected = LIBINPUT_CONFIG_SCROLL_2FG;
else
expected = LIBINPUT_CONFIG_SCROLL_EDGE;
status = libinput_device_config_scroll_set_method(device,
LIBINPUT_CONFIG_SCROLL_2FG);
- if (libevdev_get_num_slots(evdev) > 1 &&
- !litest_is_synaptics_semi_mt(dev))
+ if (libevdev_get_num_slots(evdev) > 1)
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
else
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_UNSUPPORTED);