From 240ba34ebd483337438009be8e411e4d5bea9a4c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 26 Aug 2016 07:54:01 +1000 Subject: [PATCH] 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 --- tools/touchpad-edge-detector.c | 4 ++-- 1 file 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);