Skip to content

Commit

Permalink
HID: alps: fix multitouch cursor issue
Browse files Browse the repository at this point in the history
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 <masaki.ota@jp.alps.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Masaki Ota authored and Jiri Kosina committed Sep 27, 2016
1 parent 884316d commit 9a54cf4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/hid/hid-alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9a54cf4

Please sign in to comment.