mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 04:40:05 +01:00
touchpad: mark the first finger as pointer-controlling finger
Unused at the moment, but will be used later to determine if a finger should trigger motion events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
05f82c573f
commit
f3accd3c05
2 changed files with 5 additions and 0 deletions
|
|
@ -159,6 +159,9 @@ tp_begin_touch(struct tp_dispatch *tp, struct tp_touch *t)
|
|||
tp->nfingers_down++;
|
||||
assert(tp->nfingers_down >= 1);
|
||||
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
||||
|
||||
if (tp->nfingers_down == 1)
|
||||
t->is_pointer = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -169,6 +172,7 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t)
|
|||
return;
|
||||
|
||||
t->dirty = true;
|
||||
t->is_pointer = false;
|
||||
t->state = TOUCH_END;
|
||||
assert(tp->nfingers_down >= 1);
|
||||
tp->nfingers_down--;
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ struct tp_touch {
|
|||
enum touch_state state;
|
||||
bool dirty;
|
||||
bool fake; /* a fake touch */
|
||||
bool is_pointer; /* the pointer-controlling touch */
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
uint32_t millis;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue