summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-06-21 18:56:49 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-06-21 18:56:49 +0200
commit7380af2c93dc83f4f09e293717d46eadf7799e89 (patch)
tree2eb11199ef87e3181411bb848252bb5d6fed0be6 /driver
parent71168e1fb794f4a24e97177508bb1d54ae24b266 (diff)
Simplify event reading
This patch puts the reading code more in line with the upcoming mtdev library, and should remove some spurious input behavior. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'driver')
-rw-r--r--driver/multitouch.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/driver/multitouch.c b/driver/multitouch.c
index 73a025d..eef86c5 100644
--- a/driver/multitouch.c
+++ b/driver/multitouch.c
@@ -256,16 +256,13 @@ static void read_input(LocalDevicePtr local)
256{ 256{
257 struct Gestures gs; 257 struct Gestures gs;
258 struct MTouch *mt = local->private; 258 struct MTouch *mt = local->private;
259 const struct input_event *ev; 259 while (read_packet(mt, local->fd) > 0) {
260 while (ev = get_iobuf_event(&mt->buf, local->fd)) { 260 extract_gestures(&gs, mt);
261 if (parse_event(mt, ev)) { 261 handle_gestures(local, &gs, &mt->caps);
262 extract_gestures(&gs, mt); 262 }
263 handle_gestures(local, &gs, &mt->caps); 263 if (has_delayed_gestures(mt, local->fd)) {
264 } 264 extract_delayed_gestures(&gs, mt);
265 if (mt_is_idle(mt, local->fd)) { 265 handle_gestures(local, &gs, &mt->caps);
266 extract_delayed_gestures(&gs, mt);
267 handle_gestures(local, &gs, &mt->caps);
268 }
269 } 266 }
270} 267}
271 268