mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 11:40:30 +01:00
touchpad: rename the thumb detection methods
No functional changes, just prep work for a later patch where the thumbs will dynamically update their state (instead of just using yes/no/maybe). Extracted from Matt Mayfield's thumb detection patches. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
47d8f05d3b
commit
7fbfb14419
3 changed files with 12 additions and 5 deletions
|
|
@ -102,7 +102,9 @@ tp_thumb_detect_pressure_size(const struct tp_dispatch *tp,
|
|||
}
|
||||
|
||||
void
|
||||
tp_thumb_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
||||
tp_thumb_update_touch(struct tp_dispatch *tp,
|
||||
struct tp_touch *t,
|
||||
uint64_t time)
|
||||
{
|
||||
/* once a thumb, always a thumb, once ruled out always ruled out */
|
||||
if (!tp->thumb.detect_thumbs ||
|
||||
|
|
@ -178,7 +180,7 @@ tp_thumb_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
|||
}
|
||||
|
||||
void
|
||||
tp_detect_thumb_while_moving(struct tp_dispatch *tp)
|
||||
tp_thumb_update_multifinger(struct tp_dispatch *tp)
|
||||
{
|
||||
struct tp_touch *t;
|
||||
struct tp_touch *first = NULL,
|
||||
|
|
|
|||
|
|
@ -1679,7 +1679,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
|
|||
tp_motion_history_reset(t);
|
||||
}
|
||||
|
||||
tp_thumb_detect(tp, t, time);
|
||||
tp_thumb_update_touch(tp, t, time);
|
||||
tp_palm_detect(tp, t, time);
|
||||
tp_detect_wobbling(tp, t, time);
|
||||
tp_motion_hysteresis(tp, t);
|
||||
|
|
@ -1722,7 +1722,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
|
|||
if (have_new_touch &&
|
||||
tp->nfingers_down == 2 &&
|
||||
speed_exceeded_count > 5)
|
||||
tp_detect_thumb_while_moving(tp);
|
||||
tp_thumb_update_multifinger(tp);
|
||||
|
||||
if (restart_filter)
|
||||
filter_restart(tp->device->pointer.filter, tp, time);
|
||||
|
|
|
|||
|
|
@ -688,11 +688,16 @@ 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);
|
||||
tp_thumb_update_touch(struct tp_dispatch *tp,
|
||||
struct tp_touch *t,
|
||||
uint64_t time);
|
||||
|
||||
void
|
||||
tp_detect_thumb_while_moving(struct tp_dispatch *tp);
|
||||
|
||||
void
|
||||
tp_thumb_update_multifinger(struct tp_dispatch *tp);
|
||||
|
||||
void
|
||||
tp_init_thumb(struct tp_dispatch *tp);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue