Extracted from Matt Mayfield's thumb detection patches.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
}
void
+tp_thumb_reset(struct tp_dispatch *tp, struct tp_touch *t)
+{
+ t->thumb.state = THUMB_STATE_MAYBE;
+}
+
+void
tp_thumb_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
{
/* once a thumb, always a thumb, once ruled out always ruled out */
t->was_down = true;
tp->nfingers_down++;
t->palm.time = time;
- t->thumb.state = THUMB_STATE_MAYBE;
+ tp_thumb_reset(tp, t);
t->thumb.first_touch_time = time;
t->tap.is_thumb = false;
t->tap.is_palm = false;
tp_thumb_ignored(const struct tp_dispatch *tp, const struct tp_touch *t);
void
+tp_thumb_reset(struct tp_dispatch *tp, struct tp_touch *t);
+
+void
tp_thumb_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time);
void