diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-02-14 10:05:15 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-02-14 10:05:15 +0100 |
| commit | 325c9ecccb9817f70924c6ca0a08e6d064b7ed70 (patch) | |
| tree | b751b9d487a839effc4f141656f7a53af6076f97 /tools | |
| parent | 4be293e5efb9bedf841f46cbbfc0f53d3376e18b (diff) | |
Display device properties based on utouch surface instead
The current code erroneously extracts the device properties from
the evemu device, when there is a utouch surface structure to read
from. Remedied with this patch.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/utouch-frame-test-mtdev.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/tools/utouch-frame-test-mtdev.c b/tools/utouch-frame-test-mtdev.c index 13f5a68..86f5b64 100644 --- a/tools/utouch-frame-test-mtdev.c +++ b/tools/utouch-frame-test-mtdev.c | |||
| @@ -115,41 +115,30 @@ static void loop_device(struct frame_test *test, int fd) | |||
| 115 | 115 | ||
| 116 | static void report_device_caps(struct frame_test *test) | 116 | static void report_device_caps(struct frame_test *test) |
| 117 | { | 117 | { |
| 118 | #ifdef INPUT_PROP_POINTER | 118 | struct utouch_surface *s = utouch_frame_get_surface(test->fh); |
| 119 | fprintf(stderr, "device props:\n"); | 119 | fprintf(stderr, "device props:\n"); |
| 120 | if (evemu_has_prop(test->evemu, INPUT_PROP_POINTER)) | 120 | if (s->needs_pointer) |
| 121 | fprintf(stderr, "\tpointer\n"); | 121 | fprintf(stderr, "\tpointer\n"); |
| 122 | if (evemu_has_prop(test->evemu, INPUT_PROP_DIRECT)) | 122 | if (s->is_direct) |
| 123 | fprintf(stderr, "\tdirect\n"); | 123 | fprintf(stderr, "\tdirect\n"); |
| 124 | if (evemu_has_prop(test->evemu, INPUT_PROP_BUTTONPAD)) | 124 | if (s->is_buttonpad) |
| 125 | fprintf(stderr, "\tbuttonpad\n"); | 125 | fprintf(stderr, "\tbuttonpad\n"); |
| 126 | if (evemu_has_prop(test->evemu, INPUT_PROP_SEMI_MT)) | 126 | if (s->is_semi_mt) |
| 127 | fprintf(stderr, "\tsemi_mt\n"); | 127 | fprintf(stderr, "\tsemi_mt\n"); |
| 128 | #endif | ||
| 129 | fprintf(stderr, "device mt events:\n"); | 128 | fprintf(stderr, "device mt events:\n"); |
| 130 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_SLOT)) | 129 | if (s->use_touch_major) |
| 131 | fprintf(stderr, "\tslot\n"); | ||
| 132 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_TOUCH_MAJOR)) | ||
| 133 | fprintf(stderr, "\ttouch_major\n"); | 130 | fprintf(stderr, "\ttouch_major\n"); |
| 134 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_TOUCH_MINOR)) | 131 | if (s->use_touch_minor) |
| 135 | fprintf(stderr, "\ttouch_minor\n"); | 132 | fprintf(stderr, "\ttouch_minor\n"); |
| 136 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_WIDTH_MAJOR)) | 133 | if (s->use_width_major) |
| 137 | fprintf(stderr, "\twidth_major\n"); | 134 | fprintf(stderr, "\twidth_major\n"); |
| 138 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_WIDTH_MINOR)) | 135 | if (s->use_width_minor) |
| 139 | fprintf(stderr, "\twidth_minor\n"); | 136 | fprintf(stderr, "\twidth_minor\n"); |
| 140 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_ORIENTATION)) | 137 | if (s->use_orientation) |
| 141 | fprintf(stderr, "\torientation\n"); | 138 | fprintf(stderr, "\torientation\n"); |
| 142 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_POSITION_X)) | 139 | if (s->use_pressure) |
| 143 | fprintf(stderr, "\tposition_x\n"); | ||
| 144 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_POSITION_Y)) | ||
| 145 | fprintf(stderr, "\tposition_y\n"); | ||
| 146 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_TOOL_TYPE)) | ||
| 147 | fprintf(stderr, "\tposition_y\n"); | ||
| 148 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_TRACKING_ID)) | ||
| 149 | fprintf(stderr, "\ttracking_id\n"); | ||
| 150 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_PRESSURE)) | ||
| 151 | fprintf(stderr, "\tpressure\n"); | 140 | fprintf(stderr, "\tpressure\n"); |
| 152 | if (evemu_has_event(test->evemu, EV_ABS, ABS_MT_DISTANCE)) | 141 | if (s->use_distance) |
| 153 | fprintf(stderr, "\tdistance\n"); | 142 | fprintf(stderr, "\tdistance\n"); |
| 154 | } | 143 | } |
| 155 | 144 | ||
