From beab739a36435048626c69861b3ad144bce23d5b Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Mon, 30 Aug 2010 12:31:20 +0200 Subject: Adjust major / minor axes to scale Adjust reported major/minor axis to better match visual size. Signed-off-by: Henrik Rydberg --- Makefile | 2 +- debian/changelog | 6 ++++++ debian/postinst | 2 +- debian/postrm | 2 +- debian/prerm | 2 +- debian/rules | 2 +- usr/src/dkms_source_tree/dkms.conf | 2 +- usr/src/dkms_source_tree/hid-3m-pct.c | 10 ++++++---- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ebfe4ea..71ce72a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = hid-3m-pct -VERSION = 1.0.1 +VERSION = 1.0.3 SRC = usr/src TARBALL = $(NAME)-$(VERSION).dkms.tar.gz diff --git a/debian/changelog b/debian/changelog index 9df015e..e78b89f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +hid-3m-pct-dkms (1.0.3) maverick; urgency=low + + * Adjust contact size to scale + + -- Henrik Rydberg Mon, 30 Aug 2010 12:30:53 +0200 + hid-3m-pct-dkms (1.0.2) maverick; urgency=low * New upstream version pending diff --git a/debian/postinst b/debian/postinst index b8d1a8b..e1b32f4 100644 --- a/debian/postinst +++ b/debian/postinst @@ -3,7 +3,7 @@ set -e NAME=hid-3m-pct -VERSION=1.0.1 +VERSION=1.0.2 case "$1" in configure) diff --git a/debian/postrm b/debian/postrm index 2b262b5..b92e2cf 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,7 +1,7 @@ #!/bin/sh NAME=hid-3m-pct -VERSION=1.0.1 +VERSION=1.0.2 set -e diff --git a/debian/prerm b/debian/prerm index 68acd2e..86f7e93 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,7 +1,7 @@ #!/bin/sh NAME=hid-3m-pct -VERSION=1.0.1 +VERSION=1.0.2 set -e diff --git a/debian/rules b/debian/rules index 56d2de9..dc4366d 100755 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,7 @@ #export DH_VERBOSE=1 NAME=hid-3m-pct -VERSION=1.0.1 +VERSION=1.0.2 configure: configure-stamp configure-stamp: diff --git a/usr/src/dkms_source_tree/dkms.conf b/usr/src/dkms_source_tree/dkms.conf index 7674f6a..beb43ec 100644 --- a/usr/src/dkms_source_tree/dkms.conf +++ b/usr/src/dkms_source_tree/dkms.conf @@ -1,5 +1,5 @@ NAME=hid-3m-pct -VERSION=1.0.1 +VERSION=1.0.2 PACKAGE_NAME="$NAME" PACKAGE_VERSION="$VERSION" MAKE[0]="make -C ${kernel_source_dir} diff --git a/usr/src/dkms_source_tree/hid-3m-pct.c b/usr/src/dkms_source_tree/hid-3m-pct.c index 65441e0..cd4b125 100644 --- a/usr/src/dkms_source_tree/hid-3m-pct.c +++ b/usr/src/dkms_source_tree/hid-3m-pct.c @@ -162,16 +162,18 @@ static void mmm_filter_event(struct mmm_data *md, struct input_dev *input) if (f->touch) { /* this finger is on the screen */ int wide = (f->w > f->h); + /* divided by two to match visual scale of touch */ + int major = max(f->w, f->h) >> 1; + int minor = min(f->w, f->h) >> 1; + if (!f->prev_touch) f->id = md->id++; input_event(input, EV_ABS, ABS_MT_TRACKING_ID, f->id); input_event(input, EV_ABS, ABS_MT_POSITION_X, f->x); input_event(input, EV_ABS, ABS_MT_POSITION_Y, f->y); input_event(input, EV_ABS, ABS_MT_ORIENTATION, wide); - input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, - wide ? f->w : f->h); - input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, - wide ? f->h : f->w); + input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, major); + input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, minor); /* touchscreen emulation: pick the oldest contact */ if (!oldest || ((f->id - oldest->id) & (SHRT_MAX + 1))) oldest = f; -- cgit v1.2.3