src/evdev-mt-touchpad.c
static inline void
tp_maybe_end_touch(struct tp_dispatch *tp,
		   struct tp_touch *t,
		   uint64_t time)
{
	switch (t->state) {
	case TOUCH_NONE:
	case TOUCH_MAYBE_END:
		return;
	case TOUCH_END:
		evdev_log_bug_libinput(tp->device,
				       "touch %d: already in TOUCH_END\n",
				       t->index);
		return;
	case TOUCH_HOVERING:
	case TOUCH_BEGIN:
	case TOUCH_UPDATE:
		break;
	}

	if (t->state != TOUCH_HOVERING) {
		assert(tp->nfingers_down >= 1);
		tp->nfingers_down--;
		t->state = TOUCH_MAYBE_END;
	} else {
		t->state = TOUCH_NONE;
	}

	t->dirty = true;
}
/**
 * Schedule a touch to be ended, based on either the events or some
 * attributes of the touch (size, pressure). In some cases we need to
 * resurrect a touch that has ended, so this doesn't actually end the touch
 * yet. All the TOUCH_MAYBE_END touches get properly ended once the device
 * state has been processed once and we know how many zombie touches we
 * need.
 */
Schedule a touch to be ended, based on either the events or some
attributes of the touch (size, pressure). In some cases we need to
resurrect a touch that has ended, so this doesn't actually end the touch
yet. All the TOUCH_MAYBE_END touches get properly ended once the device
state has been processed once and we know how many zombie touches we
need.
Schedule a touch to be ended based on either the events or some attributes of the touch ( size pressure ) . In some cases we need to resurrect a touch that has ended so this doesn ' t actually end the touch yet . All the TOUCH_MAYBE_END touches get properly ended once the device state has been processed once and we know how many zombie touches we need .
static inline void
tp_maybe_end_touch(struct tp_dispatch *tp,
		   struct tp_touch *t,
		   uint64_t time)
{
	switch (t->state) {
	case TOUCH_NONE:
	case TOUCH_MAYBE_END:
		return;
	case TOUCH_END:
		evdev_log_bug_libinput(tp->device,
				       "touch %d: already in TOUCH_END\n",
				       t->index);
		return;
	case TOUCH_HOVERING:
	case TOUCH_BEGIN:
	case TOUCH_UPDATE:
		break;
	}
	if (t->state != TOUCH_HOVERING) {
		assert(tp->nfingers_down >= 1);
		tp->nfingers_down--;
		t->state = TOUCH_MAYBE_END;
	} else {
		t->state = TOUCH_NONE;
	}
	t->dirty = true;
}
static inline void tp_maybe_end_touch ( struct tp_dispatch * tp , struct tp_touch * t , uint64_t time ) { switch ( t -> state ) { case TOUCH_NONE : case TOUCH_MAYBE_END : return ; case TOUCH_END : evdev_log_bug_libinput ( tp -> device , " \n " , t -> index ) ; return ; case TOUCH_HOVERING : case TOUCH_BEGIN : case TOUCH_UPDATE : break ; } if ( t -> state != TOUCH_HOVERING ) { assert ( tp -> nfingers_down >= 1 ) ; tp -> nfingers_down -- ; t -> state = TOUCH_MAYBE_END ; } else { t -> state = TOUCH_NONE ; } t -> dirty = true ; }
Schedule a touch to be ended, based on either the events or some
 attributes of the touch (size, pressure).
Schedule a touch to be ended based on either the events or some attributes of the touch ( size pressure ) .