From: Peter Hutterer Date: Thu, 25 Aug 2016 21:54:01 +0000 (+1000) Subject: tools: fix the touchpad resolution calculation X-Git-Tag: libevdev-1.5.4~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=240ba34ebd483337438009be8e411e4d5bea9a4c;p=platform%2Fupstream%2Flibevdev.git 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 --- 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);