summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gestures.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gestures.c b/src/gestures.c
index 44b9613..fb81576 100644
--- a/src/gestures.c
+++ b/src/gestures.c
@@ -26,7 +26,8 @@
26#include "gestures.h" 26#include "gestures.h"
27 27
28/* timer for cursor stability on finger touch/release */ 28/* timer for cursor stability on finger touch/release */
29static const int AFTER_FINGER_CHANGE_MS = 70; 29static const int FINGER_ATTACK_MS = 70;
30static const int FINGER_DECAY_MS = 120;
30 31
31static void extract_movement(struct Gestures *gs, struct MTouch* mt) 32static void extract_movement(struct Gestures *gs, struct MTouch* mt)
32{ 33{
@@ -51,7 +52,11 @@ static void extract_movement(struct Gestures *gs, struct MTouch* mt)
51 y /= mt->state.nfinger; 52 y /= mt->state.nfinger;
52 53
53 if (!same_fingers) { 54 if (!same_fingers) {
54 mt->mem.move_time = mt->state.evtime + AFTER_FINGER_CHANGE_MS; 55 mt->mem.move_time = mt->state.evtime;
56 if (mt->state.nfinger > mt->prev_state.nfinger)
57 mt->mem.move_time += FINGER_ATTACK_MS;
58 else
59 mt->mem.move_time += FINGER_DECAY_MS;
55 } else if (mt->state.evtime >= mt->mem.move_time) { 60 } else if (mt->state.evtime >= mt->mem.move_time) {
56 gs->dx = x - mt->mem.move_x; 61 gs->dx = x - mt->mem.move_x;
57 gs->dy = y - mt->mem.move_y; 62 gs->dy = y - mt->mem.move_y;