summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-30 12:31:20 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-30 12:31:20 +0200
commitbeab739a36435048626c69861b3ad144bce23d5b (patch)
tree2d54e54b1f24f5b062240fbbc3b5d1955109846f
parentb2dede96923654de8dfc41413e0f2fceda131efa (diff)
Adjust major / minor axes to scale
Adjust reported major/minor axis to better match visual size. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r--Makefile2
-rw-r--r--debian/changelog6
-rw-r--r--debian/postinst2
-rw-r--r--debian/postrm2
-rw-r--r--debian/prerm2
-rwxr-xr-xdebian/rules2
-rw-r--r--usr/src/dkms_source_tree/dkms.conf2
-rw-r--r--usr/src/dkms_source_tree/hid-3m-pct.c10
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 @@
1NAME = hid-3m-pct 1NAME = hid-3m-pct
2VERSION = 1.0.1 2VERSION = 1.0.3
3SRC = usr/src 3SRC = usr/src
4 4
5TARBALL = $(NAME)-$(VERSION).dkms.tar.gz 5TARBALL = $(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 @@
1hid-3m-pct-dkms (1.0.3) maverick; urgency=low
2
3 * Adjust contact size to scale
4
5 -- Henrik Rydberg <rydberg@bitmath.org> Mon, 30 Aug 2010 12:30:53 +0200
6
1hid-3m-pct-dkms (1.0.2) maverick; urgency=low 7hid-3m-pct-dkms (1.0.2) maverick; urgency=low
2 8
3 * New upstream version pending 9 * 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 @@
3set -e 3set -e
4 4
5NAME=hid-3m-pct 5NAME=hid-3m-pct
6VERSION=1.0.1 6VERSION=1.0.2
7 7
8case "$1" in 8case "$1" in
9 configure) 9 configure)
diff --git a/debian/postrm b/debian/postrm
index 2b262b5..b92e2cf 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3NAME=hid-3m-pct 3NAME=hid-3m-pct
4VERSION=1.0.1 4VERSION=1.0.2
5 5
6set -e 6set -e
7 7
diff --git a/debian/prerm b/debian/prerm
index 68acd2e..86f7e93 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3NAME=hid-3m-pct 3NAME=hid-3m-pct
4VERSION=1.0.1 4VERSION=1.0.2
5 5
6set -e 6set -e
7 7
diff --git a/debian/rules b/debian/rules
index 56d2de9..dc4366d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@
5#export DH_VERBOSE=1 5#export DH_VERBOSE=1
6 6
7NAME=hid-3m-pct 7NAME=hid-3m-pct
8VERSION=1.0.1 8VERSION=1.0.2
9 9
10configure: configure-stamp 10configure: configure-stamp
11configure-stamp: 11configure-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 @@
1NAME=hid-3m-pct 1NAME=hid-3m-pct
2VERSION=1.0.1 2VERSION=1.0.2
3PACKAGE_NAME="$NAME" 3PACKAGE_NAME="$NAME"
4PACKAGE_VERSION="$VERSION" 4PACKAGE_VERSION="$VERSION"
5MAKE[0]="make -C ${kernel_source_dir} 5MAKE[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)
162 if (f->touch) { 162 if (f->touch) {
163 /* this finger is on the screen */ 163 /* this finger is on the screen */
164 int wide = (f->w > f->h); 164 int wide = (f->w > f->h);
165 /* divided by two to match visual scale of touch */
166 int major = max(f->w, f->h) >> 1;
167 int minor = min(f->w, f->h) >> 1;
168
165 if (!f->prev_touch) 169 if (!f->prev_touch)
166 f->id = md->id++; 170 f->id = md->id++;
167 input_event(input, EV_ABS, ABS_MT_TRACKING_ID, f->id); 171 input_event(input, EV_ABS, ABS_MT_TRACKING_ID, f->id);
168 input_event(input, EV_ABS, ABS_MT_POSITION_X, f->x); 172 input_event(input, EV_ABS, ABS_MT_POSITION_X, f->x);
169 input_event(input, EV_ABS, ABS_MT_POSITION_Y, f->y); 173 input_event(input, EV_ABS, ABS_MT_POSITION_Y, f->y);
170 input_event(input, EV_ABS, ABS_MT_ORIENTATION, wide); 174 input_event(input, EV_ABS, ABS_MT_ORIENTATION, wide);
171 input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, 175 input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, major);
172 wide ? f->w : f->h); 176 input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, minor);
173 input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR,
174 wide ? f->h : f->w);
175 /* touchscreen emulation: pick the oldest contact */ 177 /* touchscreen emulation: pick the oldest contact */
176 if (!oldest || ((f->id - oldest->id) & (SHRT_MAX + 1))) 178 if (!oldest || ((f->id - oldest->id) & (SHRT_MAX + 1)))
177 oldest = f; 179 oldest = f;