diff options
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowstabletsupport.cpp | 22 | ||||
-rw-r--r-- | src/plugins/platforms/windows/windows.pro | 3 |
3 files changed, 21 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 289a61336f..9912e03cb9 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -47,7 +47,9 @@ #include "qwindowsmenu.h" #include "qwindowsmime.h" #include "qwindowsinputcontext.h" -#include "qwindowstabletsupport.h" +#if QT_CONFIG(tabletevent) +# include "qwindowstabletsupport.h" +#endif #include "qwindowstheme.h" #include <private/qguiapplication_p.h> #ifndef QT_NO_ACCESSIBILITY diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/src/plugins/platforms/windows/qwindowstabletsupport.cpp index b1f0062979..fba4e8f386 100644 --- a/src/plugins/platforms/windows/qwindowstabletsupport.cpp +++ b/src/plugins/platforms/windows/qwindowstabletsupport.cpp @@ -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); diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index 4d788d91f8..174bc7b609 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -2,9 +2,10 @@ TARGET = qwindows QT += \ core-private gui-private \ - eventdispatcher_support-private accessibility_support-private \ + eventdispatcher_support-private \ fontdatabase_support-private theme_support-private +qtConfig(accessibility): QT += accessibility_support-private qtConfig(vulkan): QT += vulkan_support-private LIBS += -lgdi32 -ldwmapi |