for (i = 0; i < tp->ntouches; i++) {
t = tp_get_touch(tp, i);
+
+ /* semi-mt finger postions may "jump" when nfingers changes */
+ if (tp->semi_mt && tp->nfingers_down != tp->old_nfingers_down)
+ tp_motion_history_reset(t);
+
if (i >= tp->real_touches && t->state != TOUCH_NONE) {
t->x = first->x;
t->y = first->y;
t->dirty = false;
}
+ tp->old_nfingers_down = tp->nfingers_down;
tp->buttons.old_state = tp->buttons.state;
tp->queued = TOUCHPAD_EVENT_NONE;
tp->has_mt = false;
}
+ tp->semi_mt = libevdev_has_property(device->evdev, INPUT_PROP_SEMI_MT);
+
ARRAY_FOR_EACH(max_touches, m) {
if (libevdev_has_event_code(device->evdev,
EV_KEY,
struct evdev_dispatch base;
struct evdev_device *device;
unsigned int nfingers_down; /* number of fingers down */
+ unsigned int old_nfingers_down; /* previous no fingers down */
unsigned int slot; /* current slot */
bool has_mt;
+ bool semi_mt;
unsigned int real_touches; /* number of slots */
unsigned int ntouches; /* no slots inc. fakes */