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

Commit 2f7b52ba authored by Shantanu Jain's avatar Shantanu Jain
Browse files

input: focaltech_touch: Reorder MT_PRESSURE and MT_TOOL_FINGER events



Report the MT_PRESSURE to be zero before marking the slot as unused.
Android's InputReader marks the slot as no longer in use when the
driver sets MT_TRACKING_ID to -1. Further MT events will re-mark
the slot as in-use, so we should ensure that we complete all
coordinate/pressure events before the final MT_TRACKING_ID event.

Change-Id: Ia4529b2815e3eda836fa224c859732698f37cefa
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent d98d6971
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -514,11 +514,11 @@ static int fts_input_dev_report_b(struct ts_event *event,
#endif
		} else {
			uppoint++;
			input_mt_report_slot_state(data->input_dev,
						MT_TOOL_FINGER, false);
#if FTS_REPORT_PRESSURE_EN
			input_report_abs(data->input_dev, ABS_MT_PRESSURE, 0);
#endif
			input_mt_report_slot_state(data->input_dev,
						MT_TOOL_FINGER, false);
			data->touchs &= ~BIT(event->au8_finger_id[i]);
			FTS_DEBUG("[B]P%d UP!", event->au8_finger_id[i]);
		}