aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/lifebook.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-05-08 21:30:32 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-05-08 21:31:49 -0400
commit9b771ac442a640999247314e8cdafd8943611700 (patch)
tree44d74a614a411da7eb86568550d871f0c8465633 /drivers/input/mouse/lifebook.c
parentaf27a69aaba2feaeb0b9eebdde2f0b71350c4789 (diff)
Input: lifebook - don't send incomplete events
When we get a relative packet from trackpoint (when we deal with touchscreen/trackpoint combo) we should not send events for the device corresponding to touchscreen as it confuses evtouch driver (it looks like it keeps previously reported absolute coordinates and the cursor stays in the same place). Reported-by: Marcin Drewka <laimoriel@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/lifebook.c')
-rw-r--r--drivers/input/mouse/lifebook.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c
index 15ac3205ac05..dcd4236af1e3 100644
--- a/drivers/input/mouse/lifebook.c
+++ b/drivers/input/mouse/lifebook.c
@@ -159,21 +159,22 @@ static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse)
159 if (!dev2) 159 if (!dev2)
160 printk(KERN_WARNING "lifebook.c: got relative packet " 160 printk(KERN_WARNING "lifebook.c: got relative packet "
161 "but no relative device set up\n"); 161 "but no relative device set up\n");
162 } else if (lifebook_use_6byte_proto) {
163 input_report_abs(dev1, ABS_X,
164 ((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f));
165 input_report_abs(dev1, ABS_Y,
166 4096 - (((packet[4] & 0x3f) << 6) | (packet[5] & 0x3f)));
167 } else { 162 } else {
168 input_report_abs(dev1, ABS_X, 163 if (lifebook_use_6byte_proto) {
169 (packet[1] | ((packet[0] & 0x30) << 4))); 164 input_report_abs(dev1, ABS_X,
170 input_report_abs(dev1, ABS_Y, 165 ((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f));
171 1024 - (packet[2] | ((packet[0] & 0xC0) << 2))); 166 input_report_abs(dev1, ABS_Y,
167 4096 - (((packet[4] & 0x3f) << 6) | (packet[5] & 0x3f)));
168 } else {
169 input_report_abs(dev1, ABS_X,
170 (packet[1] | ((packet[0] & 0x30) << 4)));
171 input_report_abs(dev1, ABS_Y,
172 1024 - (packet[2] | ((packet[0] & 0xC0) << 2)));
173 }
174 input_report_key(dev1, BTN_TOUCH, packet[0] & 0x04);
175 input_sync(dev1);
172 } 176 }
173 177
174 input_report_key(dev1, BTN_TOUCH, packet[0] & 0x04);
175 input_sync(dev1);
176
177 if (dev2) { 178 if (dev2) {
178 if (relative_packet) { 179 if (relative_packet) {
179 input_report_rel(dev2, REL_X, 180 input_report_rel(dev2, REL_X,