diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-08-26 07:54:01 +1000 |
|---|---|---|
| committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-08-26 11:43:54 +1000 |
| commit | 240ba34ebd483337438009be8e411e4d5bea9a4c (patch) | |
| tree | c5e4485138903580742c372125213557dcab164e /tools | |
| parent | 0a5f884c58128c26bc5285bc216502dffd50c59c (diff) | |
| download | libevdev-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.c | 4 |
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); |
