From 342a43e7b2ceec1dd200bffa24b052fec33f5bdc Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 30 Jul 2010 15:29:38 +0200 Subject: Introduce threading In order to enable deferred events from grail, but the event processing in a separate thread, and have the calling thread return as quickly as possible. Signed-off-by: Henrik Rydberg --- src/touch-engine.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/touch-engine.c') diff --git a/src/touch-engine.c b/src/touch-engine.c index 8e43faf..28b68da 100644 --- a/src/touch-engine.c +++ b/src/touch-engine.c @@ -40,7 +40,8 @@ static void update_frame(struct touch_frame *frame, struct touch *touch = &frame->touch[slot]; touch->active = active; if (mask && prop) { - for (int i = 0; i < DIM_TOUCH_PROP; i++) + int i; + for (i = 0; i < DIM_TOUCH_PROP; i++) if (has_prop(mask, i)) touch->prop[i] = prop[i]; } @@ -48,10 +49,10 @@ static void update_frame(struct touch_frame *frame, static void finalize_frame(struct touch_frame *frame, touch_time_t time) { - int last = -1; + int i, last = -1; frame->ntouch = 0; frame->slot = -1; - for (int i = 0; i < DIM_TOUCH_PROP; i++) { + for (i = 0; i < DIM_TOUCH_PROP; i++) { frame->touch[i].next = -1; if (frame->touch[i].active) { if (last < 0) -- cgit v1.2.3