summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2019-10-03 08:37:28 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2019-10-08 23:16:30 +0200
commitee9bc61cd906505271bad887664c15b9397906ab (patch)
tree4e52c0fb9ed7d2a00c9160fdb941a37ae2c7e4e9 /src/platformsupport/input
parent3425c9c6d7f7915e6f7931da46105b36245e86ad (diff)
evdevtouch: Report stationary touchpoints that include pressure changes
Task-number: QTBUG-77142 Change-Id: I35446092679573df51891302155c896a3bb6fc1c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/platformsupport/input')
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
index bf044229ff..2802c9b647 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
@@ -577,6 +577,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
m_lastTouchPoints = m_touchPoints;
m_touchPoints.clear();
Qt::TouchPointStates combinedStates;
+ bool hasPressure = false;
for (auto i = m_contacts.begin(), end = m_contacts.end(); i != end; /*erasing*/) {
auto it = i++;
@@ -607,6 +608,9 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
continue;
}
+ if (contact.pressure)
+ hasPressure = true;
+
addTouchPoint(contact, &combinedStates);
}
@@ -651,7 +655,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
m_contacts.clear();
- if (!m_touchPoints.isEmpty() && combinedStates != Qt::TouchPointStationary)
+ if (!m_touchPoints.isEmpty() && (hasPressure || combinedStates != Qt::TouchPointStationary))
reportPoints();
}