diff options
author | Masaki Ota <012nexus@gmail.com> | 2016-09-27 01:04:37 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2016-09-27 07:50:09 -0400 |
commit | 9a54cf462d6f3c383a5a4f5fe15c020a03db44e6 (patch) | |
tree | 53bee8d449c5d9012d72468f413d1fba8d97ce7e | |
parent | 884316deb4c9fdf9becfa31831a9e40717e3026c (diff) |
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 <masaki.ota@jp.alps.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-alps.c | 12 |
1 files changed, 6 insertions, 6 deletions
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, | |||
190 | if (z != 0) { | 190 | if (z != 0) { |
191 | input_mt_report_slot_state(hdata->input, | 191 | input_mt_report_slot_state(hdata->input, |
192 | MT_TOOL_FINGER, 1); | 192 | MT_TOOL_FINGER, 1); |
193 | input_report_abs(hdata->input, | ||
194 | ABS_MT_POSITION_X, x); | ||
195 | input_report_abs(hdata->input, | ||
196 | ABS_MT_POSITION_Y, y); | ||
197 | input_report_abs(hdata->input, | ||
198 | ABS_MT_PRESSURE, z); | ||
193 | } else { | 199 | } else { |
194 | input_mt_report_slot_state(hdata->input, | 200 | input_mt_report_slot_state(hdata->input, |
195 | MT_TOOL_FINGER, 0); | 201 | MT_TOOL_FINGER, 0); |
196 | break; | ||
197 | } | 202 | } |
198 | |||
199 | input_report_abs(hdata->input, ABS_MT_POSITION_X, x); | ||
200 | input_report_abs(hdata->input, ABS_MT_POSITION_Y, y); | ||
201 | input_report_abs(hdata->input, ABS_MT_PRESSURE, z); | ||
202 | |||
203 | } | 203 | } |
204 | 204 | ||
205 | input_mt_sync_frame(hdata->input); | 205 | input_mt_sync_frame(hdata->input); |