diff options
| author | Henrik Rydberg <rydberg@bitmath.org> | 2010-07-30 15:29:38 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-08-05 22:48:38 +0200 |
| commit | 342a43e7b2ceec1dd200bffa24b052fec33f5bdc (patch) | |
| tree | 291938b98037efe6e0def19e7457b9a947c484f1 /src/touch-engine.c | |
| parent | e0eb1015bf30fd0913db571b000ba6a83ea22660 (diff) | |
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 <rydberg@bitmath.org>
Diffstat (limited to 'src/touch-engine.c')
| -rw-r--r-- | src/touch-engine.c | 7 |
1 files changed, 4 insertions, 3 deletions
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, | |||
| 40 | struct touch *touch = &frame->touch[slot]; | 40 | struct touch *touch = &frame->touch[slot]; |
| 41 | touch->active = active; | 41 | touch->active = active; |
| 42 | if (mask && prop) { | 42 | if (mask && prop) { |
| 43 | for (int i = 0; i < DIM_TOUCH_PROP; i++) | 43 | int i; |
| 44 | for (i = 0; i < DIM_TOUCH_PROP; i++) | ||
| 44 | if (has_prop(mask, i)) | 45 | if (has_prop(mask, i)) |
| 45 | touch->prop[i] = prop[i]; | 46 | touch->prop[i] = prop[i]; |
| 46 | } | 47 | } |
| @@ -48,10 +49,10 @@ static void update_frame(struct touch_frame *frame, | |||
| 48 | 49 | ||
| 49 | static void finalize_frame(struct touch_frame *frame, touch_time_t time) | 50 | static void finalize_frame(struct touch_frame *frame, touch_time_t time) |
| 50 | { | 51 | { |
| 51 | int last = -1; | 52 | int i, last = -1; |
| 52 | frame->ntouch = 0; | 53 | frame->ntouch = 0; |
| 53 | frame->slot = -1; | 54 | frame->slot = -1; |
| 54 | for (int i = 0; i < DIM_TOUCH_PROP; i++) { | 55 | for (i = 0; i < DIM_TOUCH_PROP; i++) { |
| 55 | frame->touch[i].next = -1; | 56 | frame->touch[i].next = -1; |
| 56 | if (frame->touch[i].active) { | 57 | if (frame->touch[i].active) { |
| 57 | if (last < 0) | 58 | if (last < 0) |
