From d9bbb8d87508677dda2be8df7e26213774f3166c Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 14 Apr 2010 15:39:44 +0200 Subject: Extract moving fingers The current code determines the moving, scrolling and swiping gestures based on the number of fingers on the trackpad, including the resting fingers at the bottom of the pad. With information about all fingers at hand, it is possible to determine which fingers on the trackpad are participating in a moving gesture. This patch computes the movement based on the pointing fingers only, and uses that number to determine the type of moving gesture. Signed-off-by: Henrik Rydberg --- src/memory.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/memory.h') diff --git a/src/memory.h b/src/memory.h index 3b947b9..5e8a31c 100644 --- a/src/memory.h +++ b/src/memory.h @@ -25,10 +25,13 @@ #include "mtstate.h" struct Memory { - unsigned btdata, pointing; + unsigned btdata, pointing, moving; int npoint, ybar; mstime_t move_time; - int move_x, move_y; + int dx[DIM_FINGER], dy[DIM_FINGER], nmove; + + + }; void init_memory(struct Memory *mem); -- cgit v1.2.3