summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-09-15 11:53:44 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-09-15 11:57:52 +1000
commit2a612997abaed6deca08d8dc7fc54079b7aabcf4 (patch)
tree1da83aee55ab886bda9e7885e5ee0d566e796856 /tools
parentd05736765cfa75e10f6aa4363baeb0fe0da86f92 (diff)
downloadlibevdev-2a612997abaed6deca08d8dc7fc54079b7aabcf4.tar.gz
tools: fix kernel-announced width/height
Side-effect of 240ba34ebd483 was that "touchpad size as listed by the kernel" was now dependent on the values we got. This one is a static one based on the axis info. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/touchpad-edge-detector.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/touchpad-edge-detector.c b/tools/touchpad-edge-detector.c
index ca34414..cc81ec1 100644
--- a/tools/touchpad-edge-detector.c
+++ b/tools/touchpad-edge-detector.c
@@ -190,8 +190,10 @@ print_udev_override_rule(struct libevdev *dev,
yres = round((double)h/size->h);
if (x->resolution && y->resolution) {
+ int width = x->maximum - x->minimum,
+ height = y->maximum - y->minimum;
printf("Touchpad size as listed by the kernel: %dx%dmm\n",
- w/x->resolution, h/y->resolution);
+ width/x->resolution, height/y->resolution);
} else {
printf("Touchpad has no resolution, size unknown\n");
}