diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-10-03 08:37:28 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-10-09 08:52:40 +0000 |
commit | 41e59afc4129260f783553777ef8a2092df1192c (patch) | |
tree | 8bde2f4a8686897afce928fa59b032bb80f53f70 /src | |
parent | d1646b37b1f0a04dc79a10438b82ed231786e871 (diff) |
evdevtouch: Report stationary touchpoints that include pressure changes
Task-number: QTBUG-77142
Change-Id: I35446092679573df51891302155c896a3bb6fc1c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit ee9bc61cd906505271bad887664c15b9397906ab)
Diffstat (limited to 'src')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index f86f80785e..70271c7fd6 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -573,6 +573,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) m_lastTouchPoints = m_touchPoints; m_touchPoints.clear(); Qt::TouchPointStates combinedStates; + bool hasPressure = false; QMutableHashIterator<int, Contact> it(m_contacts); while (it.hasNext()) { @@ -603,6 +604,9 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) continue; } + if (contact.pressure) + hasPressure = true; + addTouchPoint(contact, &combinedStates); } @@ -649,7 +653,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(); if (m_filtered) |