Windows QPA: Check validity of device when handling tablet leave
Huion GT-191 has been observed to send spurious leave events.
Amends 127483b5e3
.
Task-number: QTBUG-65120
Change-Id: I5dfa003a71be137a7b40cc9c27d7cf2cada6922d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
23c55cd37c
commit
d04187b6a1
@ -355,6 +355,8 @@ bool QWindowsTabletSupport::translateTabletProximityEvent(WPARAM /* wParam */, L
|
||||
|
||||
if (!LOWORD(lParam)) {
|
||||
qCDebug(lcQpaTablet) << "leave proximity for device #" << m_currentDevice;
|
||||
if (m_currentDevice < 0 || m_currentDevice >= m_devices.size()) // QTBUG-65120, spurious leave observed
|
||||
return false;
|
||||
if (totalPacks > 0) {
|
||||
QWindowSystemInterface::handleTabletLeaveProximityEvent(proximityBuffer[0].pkTime,
|
||||
m_devices.at(m_currentDevice).currentDevice,
|
||||
|
Loading…
Reference in New Issue
Block a user