diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common.h | 5 | ||||
| -rw-r--r-- | src/hwdata.c | 3 | ||||
| -rw-r--r-- | src/hwdata.h | 2 | ||||
| -rw-r--r-- | src/state.c | 4 |
4 files changed, 12 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h index f64e114..27082b7 100644 --- a/src/common.h +++ b/src/common.h | |||
| @@ -48,6 +48,11 @@ | |||
| 48 | #define MT_TOOL_PEN 1 | 48 | #define MT_TOOL_PEN 1 |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /* includes available in 2.6.33 */ | ||
| 52 | #ifndef ABS_MT_PRESSURE | ||
| 53 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | ||
| 54 | #endif | ||
| 55 | |||
| 51 | #define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) | 56 | #define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) |
| 52 | 57 | ||
| 53 | #define BITMASK(x) (1U << (x)) | 58 | #define BITMASK(x) (1U << (x)) |
diff --git a/src/hwdata.c b/src/hwdata.c index bd42710..9e384dc 100644 --- a/src/hwdata.c +++ b/src/hwdata.c | |||
| @@ -81,6 +81,9 @@ int read_hwdata(struct HWData *hw, const struct input_event* ev) | |||
| 81 | case ABS_MT_ORIENTATION: | 81 | case ABS_MT_ORIENTATION: |
| 82 | hw->finger[hw->nread].orientation = ev->value; | 82 | hw->finger[hw->nread].orientation = ev->value; |
| 83 | break; | 83 | break; |
| 84 | case ABS_MT_PRESSURE: | ||
| 85 | hw->finger[hw->nread].pressure = ev->value; | ||
| 86 | break; | ||
| 84 | case ABS_MT_POSITION_X: | 87 | case ABS_MT_POSITION_X: |
| 85 | hw->finger[hw->nread].position_x = ev->value; | 88 | hw->finger[hw->nread].position_x = ev->value; |
| 86 | break; | 89 | break; |
diff --git a/src/hwdata.h b/src/hwdata.h index 9b46073..38ffc6b 100644 --- a/src/hwdata.h +++ b/src/hwdata.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | struct FingerData { | 37 | struct FingerData { |
| 38 | int touch_major, touch_minor; | 38 | int touch_major, touch_minor; |
| 39 | int width_major, width_minor; | 39 | int width_major, width_minor; |
| 40 | int orientation; | 40 | int orientation, pressure; |
| 41 | int position_x, position_y; | 41 | int position_x, position_y; |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
diff --git a/src/state.c b/src/state.c index 895d096..774828a 100644 --- a/src/state.c +++ b/src/state.c | |||
| @@ -150,13 +150,15 @@ void output_state(const struct State *s) | |||
| 150 | s->nfinger); | 150 | s->nfinger); |
| 151 | for (i = 0; i < s->nfinger; i++) { | 151 | for (i = 0; i < s->nfinger; i++) { |
| 152 | xf86Msg(X_INFO, | 152 | xf86Msg(X_INFO, |
| 153 | " %+02d %+05d:%+05d +%05d:%+05d %+06d %+05d:%+05d\n", | 153 | " %+02d %+05d:%+05d +%05d:%+05d " |
| 154 | "%+06d %+06d %+05d:%+05d\n", | ||
| 154 | s->finger[i].id, | 155 | s->finger[i].id, |
| 155 | s->finger[i].hw.touch_major, | 156 | s->finger[i].hw.touch_major, |
| 156 | s->finger[i].hw.touch_minor, | 157 | s->finger[i].hw.touch_minor, |
| 157 | s->finger[i].hw.width_major, | 158 | s->finger[i].hw.width_major, |
| 158 | s->finger[i].hw.width_minor, | 159 | s->finger[i].hw.width_minor, |
| 159 | s->finger[i].hw.orientation, | 160 | s->finger[i].hw.orientation, |
| 161 | s->finger[i].hw.pressure, | ||
| 160 | s->finger[i].hw.position_x, | 162 | s->finger[i].hw.position_x, |
| 161 | s->finger[i].hw.position_y); | 163 | s->finger[i].hw.position_y); |
| 162 | } | 164 | } |
