evdevtouch: Fix wrong addTouchPoint for "mtdev"
Origin patch359546b069
has following rule: "the state for processed released points is reset to zero at the end of the SYN_REPORT handler" Patch4e400369c0
changed state according new event refactor, but not fully. Task-number: QTBUG-86013 Pick-to: 5.15 6.0 6.1 Change-Id: If35b756d5c726533f11d18e7b73c98fffa17d809 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
dec429e077
commit
462410a08b
@ -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…
Reference in New Issue
Block a user