Windows QPA: Fix reporting of TabletLeaveProximity events
Move the check for totalPacks below; it prevents leave notifications from being handled. Task-number: QTBUG-53628 Change-Id: I2436c51308803337e6d48ef958e03123283d4a1d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
198225983d
commit
127483b5e3
@ -352,16 +352,26 @@ bool QWindowsTabletSupport::translateTabletProximityEvent(WPARAM /* wParam */, L
|
||||
{
|
||||
PACKET proximityBuffer[1]; // we are only interested in the first packet in this case
|
||||
const int totalPacks = QWindowsTabletSupport::m_winTab32DLL.wTPacketsGet(m_context, 1, proximityBuffer);
|
||||
if (!totalPacks)
|
||||
return false;
|
||||
|
||||
if (!LOWORD(lParam)) {
|
||||
qCDebug(lcQpaTablet) << "leave proximity for device #" << m_currentDevice;
|
||||
QWindowSystemInterface::handleTabletLeaveProximityEvent(proximityBuffer[0].pkTime,
|
||||
m_devices.at(m_currentDevice).currentDevice,
|
||||
m_devices.at(m_currentDevice).currentPointerType,
|
||||
m_devices.at(m_currentDevice).uniqueId);
|
||||
if (totalPacks > 0) {
|
||||
QWindowSystemInterface::handleTabletLeaveProximityEvent(proximityBuffer[0].pkTime,
|
||||
m_devices.at(m_currentDevice).currentDevice,
|
||||
m_devices.at(m_currentDevice).currentPointerType,
|
||||
m_devices.at(m_currentDevice).uniqueId);
|
||||
} else {
|
||||
QWindowSystemInterface::handleTabletLeaveProximityEvent(m_devices.at(m_currentDevice).currentDevice,
|
||||
m_devices.at(m_currentDevice).currentPointerType,
|
||||
m_devices.at(m_currentDevice).uniqueId);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!totalPacks)
|
||||
return false;
|
||||
|
||||
const UINT currentCursor = proximityBuffer[0].pkCursor;
|
||||
UINT physicalCursorId;
|
||||
QWindowsTabletSupport::m_winTab32DLL.wTInfo(WTI_CURSORS + currentCursor, CSR_PHYSID, &physicalCursorId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user