evdevtouch: Report stationary touchpoints that include pressure changes
Task-number: QTBUG-77142 Change-Id: I35446092679573df51891302155c896a3bb6fc1c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
3425c9c6d7
commit
ee9bc61cd9
@ -577,6 +577,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
m_lastTouchPoints = m_touchPoints;
|
m_lastTouchPoints = m_touchPoints;
|
||||||
m_touchPoints.clear();
|
m_touchPoints.clear();
|
||||||
Qt::TouchPointStates combinedStates;
|
Qt::TouchPointStates combinedStates;
|
||||||
|
bool hasPressure = false;
|
||||||
|
|
||||||
for (auto i = m_contacts.begin(), end = m_contacts.end(); i != end; /*erasing*/) {
|
for (auto i = m_contacts.begin(), end = m_contacts.end(); i != end; /*erasing*/) {
|
||||||
auto it = i++;
|
auto it = i++;
|
||||||
@ -607,6 +608,9 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (contact.pressure)
|
||||||
|
hasPressure = true;
|
||||||
|
|
||||||
addTouchPoint(contact, &combinedStates);
|
addTouchPoint(contact, &combinedStates);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -651,7 +655,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
m_contacts.clear();
|
m_contacts.clear();
|
||||||
|
|
||||||
|
|
||||||
if (!m_touchPoints.isEmpty() && combinedStates != Qt::TouchPointStationary)
|
if (!m_touchPoints.isEmpty() && (hasPressure || combinedStates != Qt::TouchPointStationary))
|
||||||
reportPoints();
|
reportPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user