summaryrefslogtreecommitdiff
path: root/src/mtouch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mtouch.c')
-rw-r--r--src/mtouch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mtouch.c b/src/mtouch.c
index 5bf72ec..e47d69d 100644
--- a/src/mtouch.c
+++ b/src/mtouch.c
@@ -35,8 +35,9 @@ int open_mtouch(struct MTouch *mt, int fd)
35 int rc; 35 int rc;
36 init_iobuf(&mt->buf); 36 init_iobuf(&mt->buf);
37 init_hwdata(&mt->hw); 37 init_hwdata(&mt->hw);
38 init_hwstate(&mt->ohs); 38 init_hwstate(&mt->hs);
39 init_hwstate(&mt->nhs); 39 init_mtstate(&mt->prev_state);
40 init_mtstate(&mt->state);
40 SYSCALL(rc = ioctl(fd, EVIOCGRAB, (pointer)1)); 41 SYSCALL(rc = ioctl(fd, EVIOCGRAB, (pointer)1));
41 return rc; 42 return rc;
42} 43}
@@ -59,5 +60,6 @@ int read_synchronized_event(struct MTouch *mt, int fd)
59 60
60void parse_event(struct MTouch *mt) 61void parse_event(struct MTouch *mt)
61{ 62{
62 modify_hwstate(&mt->nhs, &mt->hw, &mt->caps); 63 modify_hwstate(&mt->hs, &mt->hw, &mt->caps);
64 extract_mtstate(&mt->state, &mt->hs, &mt->caps);
63} 65}