summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@bitmath.org>2010-08-06 14:32:50 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-06 14:33:32 +0200
commit3b6bc1a7dc5871aef2c47426f87bb409a622de29 (patch)
tree1cba64c0399dbb0cfb6d3820f09cf047a6f2bef2 /test
parent40d6c7304cf431f13bfe81600656b268c881a4a2 (diff)
Remove thread code
The primary usecase of grail involves using it together with the xserver, which is not threaded. Revert the touch-dev code back to the state prior to adding the threaded processing. Deferred event handling can be implemented by other means when needed. Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Diffstat (limited to 'test')
-rw-r--r--test/grail-gesture.c4
-rw-r--r--test/grail-touch.c6
2 files changed, 3 insertions, 7 deletions
diff --git a/test/grail-gesture.c b/test/grail-gesture.c
index 18c50c3..16b33ac 100644
--- a/test/grail-gesture.c
+++ b/test/grail-gesture.c
@@ -64,10 +64,8 @@ static void tp_gesture(struct grail *ge, const struct grail_event *ev)
64 64
65static void loop_device(struct grail *ge, int fd) 65static void loop_device(struct grail *ge, int fd)
66{ 66{
67 while (!grail_idle(ge, fd, 5000)) { 67 while (!grail_idle(ge, fd, 5000))
68 grail_pull(ge, fd); 68 grail_pull(ge, fd);
69 fprintf(stderr, "\r");
70 }
71} 69}
72 70
73int main(int argc, char *argv[]) 71int main(int argc, char *argv[])
diff --git a/test/grail-touch.c b/test/grail-touch.c
index 8893c0d..bed31c3 100644
--- a/test/grail-touch.c
+++ b/test/grail-touch.c
@@ -54,10 +54,8 @@ static void loop_device(struct touch_dev *dev, int fd)
54 struct touch_engine engine; 54 struct touch_engine engine;
55 touch_engine_init(&engine, tp_event, tp_sync, 0); 55 touch_engine_init(&engine, tp_event, tp_sync, 0);
56 touch_engine_attach(&engine, dev); 56 touch_engine_attach(&engine, dev);
57 while (!touch_dev_idle(dev, fd, 5000)) { 57 while (!touch_dev_idle(dev, fd, 5000))
58 touch_dev_fetch(dev, fd); 58 touch_dev_pull(dev, fd);
59 touch_dev_process(dev);
60 }
61 touch_engine_detach(&engine, dev); 59 touch_engine_detach(&engine, dev);
62} 60}
63 61