summaryrefslogtreecommitdiff
path: root/src/grail-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grail-api.c')
-rw-r--r--src/grail-api.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/grail-api.c b/src/grail-api.c
index 6ef4b7d..1d4233a 100644
--- a/src/grail-api.c
+++ b/src/grail-api.c
@@ -154,7 +154,7 @@ void GRAIL_PUBLIC grail_get_units(const struct grail *ge,
154const struct utouch_frame GRAIL_PUBLIC * 154const struct utouch_frame GRAIL_PUBLIC *
155grail_get_contact_frame(const struct grail *ge) 155grail_get_contact_frame(const struct grail *ge)
156{ 156{
157 return ge->impl->frame; 157 return ge->impl->touch;
158} 158}
159 159
160static void flush_events(struct grail *ge) 160static void flush_events(struct grail *ge)
@@ -226,15 +226,15 @@ static int gesture_timeout(struct grail *ge, const struct utouch_frame *frame)
226} 226}
227 227
228static void report_frame(struct grail *ge, 228static void report_frame(struct grail *ge,
229 const struct utouch_frame *frame, 229 const struct utouch_frame *touch,
230 const struct input_event *syn) 230 const struct input_event *syn)
231{ 231{
232 struct grail_impl *impl = ge->impl; 232 struct grail_impl *impl = ge->impl;
233 struct grail_event gev; 233 struct grail_event gev;
234 234
235 ge->impl->frame = frame; 235 impl->touch = touch;
236 236
237 if (frame->num_active && !frame->prev->num_active) { 237 if (touch->num_active && !touch->prev->num_active) {
238 impl->ongoing = 1; 238 impl->ongoing = 1;
239 impl->gesture = 0; 239 impl->gesture = 0;
240 } 240 }
@@ -242,14 +242,14 @@ static void report_frame(struct grail *ge,
242 if (!impl->ongoing) 242 if (!impl->ongoing)
243 return; 243 return;
244 244
245 gin_frame_begin(ge, frame); 245 gin_frame_begin(ge, touch);
246 gru_recognize(ge, frame); 246 gru_recognize(ge, touch);
247 gin_frame_end(ge, frame); 247 gin_frame_end(ge, touch);
248 248
249 if (!grailbuf_empty(&impl->gbuf)) 249 if (!grailbuf_empty(&impl->gbuf))
250 impl->gesture = 1; 250 impl->gesture = 1;
251 251
252 if (frame->num_active == 0 || gesture_timeout(ge, frame)) 252 if (touch->num_active == 0 || gesture_timeout(ge, touch))
253 impl->ongoing &= impl->gesture; 253 impl->ongoing &= impl->gesture;
254} 254}
255 255