diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-06-18 01:57:33 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-10-12 15:39:43 +0200 |
| commit | 8b621e667dda08a127e3028a2e03d5ed619b9499 (patch) | |
| tree | a2848c15d958627460cf167778b89abd351df7cb /src | |
| parent | ffb67f4795ace2d6d9f5890faae60b97e18f84fb (diff) | |
Use a non-blocking example instead of blocking
The non-blocking example is more interesting in the X applications.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
| -rw-r--r-- | src/test.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -35,8 +35,8 @@ static void loop_device(int fd) | |||
| 35 | fprintf(stderr, "error: could not open device\n"); | 35 | fprintf(stderr, "error: could not open device\n"); |
| 36 | return; | 36 | return; |
| 37 | } | 37 | } |
| 38 | while (mtdev_pull(&mt.dev, fd, 1) > 0) { | 38 | while (!mtdev_idle(&mt.dev, fd, 5000)) { |
| 39 | if (parse_event(&mt)) { | 39 | while (read_packet(&mt, fd) > 0) { |
| 40 | extract_gestures(&gs, &mt); | 40 | extract_gestures(&gs, &mt); |
| 41 | output_gesture(&gs); | 41 | output_gesture(&gs); |
| 42 | } | 42 | } |
