diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 93349870..e6b38647 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -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--; diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 327ce115..df83b2c5 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -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;