From: Masaki Ota <012nexus@gmail.com> Date: Tue, 27 Sep 2016 05:04:37 +0000 (+0900) Subject: HID: alps: fix multitouch cursor issue X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9a54cf462d6f3c383a5a4f5fe15c020a03db44e6;p=linux-beck.git HID: alps: fix multitouch cursor issue Issue reproduction procedure: 1. three or more fingers put on Touchpad. 2. release fingers from Touchpad. 3. move the cursor by one finger. 4. the cursor does not move. Cause: We do not notify multi fingers state correctly to input subsystem. For example, when three fingers release from Touchpad, fingers state is 3 -> 0. It needs to notify first, second and third finger's releasing state. Fix this by not breaking out on z axis and move x,y,z input handling code to the correct place so that it's in fact per-finger. [jkosina@suse.cz: reword changelog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index 048befde295a..610df92837bb 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -190,16 +190,16 @@ static int alps_raw_event(struct hid_device *hdev, if (z != 0) { input_mt_report_slot_state(hdata->input, MT_TOOL_FINGER, 1); + input_report_abs(hdata->input, + ABS_MT_POSITION_X, x); + input_report_abs(hdata->input, + ABS_MT_POSITION_Y, y); + input_report_abs(hdata->input, + ABS_MT_PRESSURE, z); } else { input_mt_report_slot_state(hdata->input, MT_TOOL_FINGER, 0); - break; } - - input_report_abs(hdata->input, ABS_MT_POSITION_X, x); - input_report_abs(hdata->input, ABS_MT_POSITION_Y, y); - input_report_abs(hdata->input, ABS_MT_PRESSURE, z); - } input_mt_sync_frame(hdata->input);