summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grail-api.c16
-rw-r--r--src/grail-impl.h2
-rw-r--r--src/grail-legacy.c2
3 files changed, 10 insertions, 10 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
diff --git a/src/grail-impl.h b/src/grail-impl.h
index 7036382..8f73a2d 100644
--- a/src/grail-impl.h
+++ b/src/grail-impl.h
@@ -38,7 +38,7 @@ struct grail_impl {
38 struct evemu_device *evemu; 38 struct evemu_device *evemu;
39 struct mtdev *mtdev; 39 struct mtdev *mtdev;
40 utouch_frame_handle fh; 40 utouch_frame_handle fh;
41 const struct utouch_frame *frame; 41 const struct utouch_frame *touch;
42 struct evbuf evbuf; 42 struct evbuf evbuf;
43 struct grailbuf gbuf; 43 struct grailbuf gbuf;
44 int filter_abs; 44 int filter_abs;
diff --git a/src/grail-legacy.c b/src/grail-legacy.c
index 779595b..7e5c969 100644
--- a/src/grail-legacy.c
+++ b/src/grail-legacy.c
@@ -42,7 +42,7 @@ int GRAIL_PUBLIC grail_get_contacts(const struct grail *ge,
42 struct grail_contact *touch, int max_touch) 42 struct grail_contact *touch, int max_touch)
43{ 43{
44 const struct gesture_inserter *gin = ge->gin; 44 const struct gesture_inserter *gin = ge->gin;
45 const struct utouch_frame *frame = ge->impl->frame; 45 const struct utouch_frame *frame = ge->impl->touch;
46 int i; 46 int i;
47 if (frame->num_active < max_touch) 47 if (frame->num_active < max_touch)
48 max_touch = frame->num_active; 48 max_touch = frame->num_active;