summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rw-r--r--usr/src/dkms_source_tree/dkms.conf2
-rw-r--r--usr/src/dkms_source_tree/hid-3m-pct.c10
2 files changed, 7 insertions, 5 deletions
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;