Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b771ac4 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

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: default avatarMarcin Drewka <laimoriel@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent af27a69a
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -159,7 +159,8 @@ static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse)
		if (!dev2)
			printk(KERN_WARNING "lifebook.c: got relative packet "
				"but no relative device set up\n");
	} else if (lifebook_use_6byte_proto) {
	} else {
		if (lifebook_use_6byte_proto) {
			input_report_abs(dev1, ABS_X,
				((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f));
			input_report_abs(dev1, ABS_Y,
@@ -170,9 +171,9 @@ static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse)
			input_report_abs(dev1, ABS_Y,
				1024 - (packet[2] | ((packet[0] & 0xC0) << 2)));
		}

		input_report_key(dev1, BTN_TOUCH, packet[0] & 0x04);
		input_sync(dev1);
	}

	if (dev2) {
		if (relative_packet) {