summaryrefslogtreecommitdiff
path: root/src/grail-gestures.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grail-gestures.c')
-rw-r--r--src/grail-gestures.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/grail-gestures.c b/src/grail-gestures.c
index 035a199..efadde5 100644
--- a/src/grail-gestures.c
+++ b/src/grail-gestures.c
@@ -111,6 +111,7 @@ static void move_reset(struct move_model *m, int i, float x, grail_time_t t)
111 fm->sample_ms = t; 111 fm->sample_ms = t;
112 m->tickle &= ~(1 << i); 112 m->tickle &= ~(1 << i);
113 m->active &= ~(1 << i); 113 m->active &= ~(1 << i);
114 m->timeout &= ~(1 << i);
114} 115}
115 116
116static void move_update(struct move_model *m, int i, float x, grail_time_t t) 117static void move_update(struct move_model *m, int i, float x, grail_time_t t)
@@ -132,11 +133,14 @@ static void move_update(struct move_model *m, int i, float x, grail_time_t t)
132 if (m->active & (1 << i)) 133 if (m->active & (1 << i))
133 return; 134 return;
134 fm->action_delta = x - fm->original; 135 fm->action_delta = x - fm->original;
135 if (fabs(fm->action_delta) > fm->bar || 136 if (fabs(fm->action_delta) > fm->bar) {
136 t - fm->original_ms > fm->bar_ms)
137 m->active |= (1 << i); 137 m->active |= (1 << i);
138 else 138 } else if (t - fm->original_ms > fm->bar_ms) {
139 m->active |= (1 << i);
140 m->timeout |= (1 << i);
141 } else {
139 fm->action_delta = 0; 142 fm->action_delta = 0;
143 }
140} 144}
141 145
142void gru_init_motion(struct grail *ge) 146void gru_init_motion(struct grail *ge)