diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/touch-dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/touch-dev.c b/src/touch-dev.c index 287076a..17082ed 100644 --- a/src/touch-dev.c +++ b/src/touch-dev.c | |||
| @@ -25,6 +25,9 @@ | |||
| 25 | #include <string.h> | 25 | #include <string.h> |
| 26 | #include <errno.h> | 26 | #include <errno.h> |
| 27 | 27 | ||
| 28 | /* see mtdev-mapping.h */ | ||
| 29 | #define MTDEV_TOUCH_MINOR 1 | ||
| 30 | |||
| 28 | #define SET_PROP(name, value) \ | 31 | #define SET_PROP(name, value) \ |
| 29 | if (t->name != value) { \ | 32 | if (t->name != value) { \ |
| 30 | t->name = value; \ | 33 | t->name = value; \ |
| @@ -34,6 +37,9 @@ | |||
| 34 | static void finish_touch(struct touch_dev *dev, struct touch_frame *frame) | 37 | static void finish_touch(struct touch_dev *dev, struct touch_frame *frame) |
| 35 | { | 38 | { |
| 36 | struct touch *t = &frame->touch[dev->slot]; | 39 | struct touch *t = &frame->touch[dev->slot]; |
| 40 | if (t->touch_major && !t->touch_minor || | ||
| 41 | !dev->mtdev.caps.has_abs[MTDEV_TOUCH_MINOR]) | ||
| 42 | SET_PROP(touch_minor, t->touch_major); | ||
| 37 | if (dev->state > 0) { | 43 | if (dev->state > 0) { |
| 38 | t->active = 1; | 44 | t->active = 1; |
| 39 | grail_mask_set(frame->touches, dev->slot); | 45 | grail_mask_set(frame->touches, dev->slot); |
