summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorValery Volgutov <valery.volgutov@lge.com>2021-01-22 18:47:30 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2021-02-23 14:22:20 +0000
commit462410a08b8bbfb068b6e06573adb0701c527d06 (patch)
tree5659be9c354484049d54fa65644c95bf2cc27bd2 /src/platformsupport
parentdec429e0778493bc4e85d6b18202804d0bbbe5f1 (diff)
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 Pick-to: 5.15 6.0 6.1 Change-Id: If35b756d5c726533f11d18e7b73c98fffa17d809 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
index cf2f300207..eb693426d9 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
@@ -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;