evdevtouch: Fix wrong addTouchPoint for "mtdev"
Origin patch 359546b069051213a7b337fefbe21b664618f959 has following rule: "the state for processed released points is reset to zero at the end of the SYN_REPORT handler" Patch 4e400369c08db251cd489fec1229398c224d02b4 changed state according new event refactor, but not fully. Task-number: QTBUG-86013 Change-Id: If35b756d5c726533f11d18e7b73c98fffa17d809 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 462410a08b8bbfb068b6e06573adb0701c527d06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7833eae304
commit
d0dbb79363
@ -589,8 +589,10 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
||||
for (auto it = m_contacts.begin(), end = m_contacts.end(); it != end; /*erasing*/) {
|
||||
Contact &contact(it.value());
|
||||
|
||||
if (!contact.state)
|
||||
if (!contact.state) {
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
|
||||
int key = m_typeB ? it.key() : contact.trackingId;
|
||||
if (!m_typeB && m_lastContacts.contains(key)) {
|
||||
@ -641,12 +643,14 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
||||
for (auto it = m_contacts.begin(), end = m_contacts.end(); it != end; /*erasing*/) {
|
||||
Contact &contact(it.value());
|
||||
|
||||
if (!contact.state)
|
||||
if (!contact.state) {
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (contact.state == QEventPoint::State::Released) {
|
||||
if (m_typeB) {
|
||||
contact.state = QEventPoint::State::Stationary;
|
||||
contact.state = QEventPoint::State::Unknown;
|
||||
} else {
|
||||
it = m_contacts.erase(it);
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user