summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-08-26 07:54:01 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-08-26 11:43:54 +1000
commit240ba34ebd483337438009be8e411e4d5bea9a4c (patch)
treec5e4485138903580742c372125213557dcab164e /tools
parent0a5f884c58128c26bc5285bc216502dffd50c59c (diff)
downloadlibevdev-240ba34ebd483337438009be8e411e4d5bea9a4c.tar.gz
tools: fix the touchpad resolution calculation
Previous ones used the absinfo from the kernel but since we never updated that from within the tool, the output was always the same. 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, 2 insertions, 2 deletions
diff --git a/tools/touchpad-edge-detector.c b/tools/touchpad-edge-detector.c
index e09f028..ca34414 100644
--- a/tools/touchpad-edge-detector.c
+++ b/tools/touchpad-edge-detector.c
@@ -184,8 +184,8 @@ print_udev_override_rule(struct libevdev *dev,
x = libevdev_get_abs_info(dev, ABS_X);
y = libevdev_get_abs_info(dev, ABS_Y);
- w = x->maximum - x->minimum;
- h = y->maximum - y->minimum;
+ w = dim->right - dim->left;
+ h = dim->bottom - dim->top;
xres = round((double)w/size->w);
yres = round((double)h/size->h);