diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/capabilities.c | 9 | ||||
| -rw-r--r-- | src/capabilities.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/capabilities.c b/src/capabilities.c index 620ab60..804b626 100644 --- a/src/capabilities.c +++ b/src/capabilities.c | |||
| @@ -56,6 +56,12 @@ int read_capabilities(struct Capabilities *cap, int fd) | |||
| 56 | 56 | ||
| 57 | memset(cap, 0, sizeof(struct Capabilities)); | 57 | memset(cap, 0, sizeof(struct Capabilities)); |
| 58 | 58 | ||
| 59 | SYSCALL(rc = ioctl(fd, EVIOCGID, &cap->devid)); | ||
| 60 | if (rc < 0) | ||
| 61 | return rc; | ||
| 62 | SYSCALL(rc = ioctl(fd, EVIOCGNAME(sizeof(cap->devname)), cap->devname)); | ||
| 63 | if (rc < 0) | ||
| 64 | return rc; | ||
| 59 | SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_SYN, sizeof(evbits)), evbits)); | 65 | SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_SYN, sizeof(evbits)), evbits)); |
| 60 | if (rc < 0) | 66 | if (rc < 0) |
| 61 | return rc; | 67 | return rc; |
| @@ -115,6 +121,9 @@ void output_capabilities(const struct Capabilities *cap) | |||
| 115 | ADDCAP(line, cap, orientation); | 121 | ADDCAP(line, cap, orientation); |
| 116 | ADDCAP(line, cap, position_x); | 122 | ADDCAP(line, cap, position_x); |
| 117 | ADDCAP(line, cap, position_y); | 123 | ADDCAP(line, cap, position_y); |
| 124 | xf86Msg(X_INFO, "multitouch: devname: %s\n", cap->devname); | ||
| 125 | xf86Msg(X_INFO, "multitouch: devid: %x %x %x\n", | ||
| 126 | cap->devid.vendor, cap->devid.product, cap->devid.version); | ||
| 118 | xf86Msg(X_INFO, "multitouch: caps:%s\n", line); | 127 | xf86Msg(X_INFO, "multitouch: caps:%s\n", line); |
| 119 | if (cap->has_touch_major) | 128 | if (cap->has_touch_major) |
| 120 | xf86Msg(X_INFO, "multitouch: touch: %d %d\n", | 129 | xf86Msg(X_INFO, "multitouch: touch: %d %d\n", |
diff --git a/src/capabilities.h b/src/capabilities.h index 591eed6..68835c6 100644 --- a/src/capabilities.h +++ b/src/capabilities.h | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include "common.h" | 25 | #include "common.h" |
| 26 | 26 | ||
| 27 | struct Capabilities { | 27 | struct Capabilities { |
| 28 | struct input_id devid; | ||
| 29 | char devname[32]; | ||
| 28 | int has_left, has_middle; | 30 | int has_left, has_middle; |
| 29 | int has_right, has_mtdata; | 31 | int has_right, has_mtdata; |
| 30 | int has_touch_major, has_touch_minor; | 32 | int has_touch_major, has_touch_minor; |
