summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowstabletsupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstabletsupport.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowstabletsupport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/src/plugins/platforms/windows/qwindowstabletsupport.cpp
index 8b863ec43d..484ed9cb05 100644
--- a/src/plugins/platforms/windows/qwindowstabletsupport.cpp
+++ b/src/plugins/platforms/windows/qwindowstabletsupport.cpp
@@ -159,6 +159,7 @@ bool QWindowsWinTab32DLL::init()
QWindowsTabletSupport::QWindowsTabletSupport(HWND window, HCTX context)
: m_window(window)
, m_context(context)
+ , m_absoluteRange(20)
, m_tiltSupport(false)
, m_currentDevice(-1)
{
@@ -402,7 +403,6 @@ bool QWindowsTabletSupport::translateTabletPacketEvent()
// in which case we snap the position to the mouse position.
// It seems there is no way to find out the mode programmatically, the LOGCONTEXT orgX/Y/Ext
// area is always the virtual desktop.
- enum { absoluteRange = 20 };
const QRect virtualDesktopArea = QGuiApplication::primaryScreen()->virtualGeometry();
qCDebug(lcQpaTablet) << __FUNCTION__ << "processing " << packetCount
@@ -427,7 +427,7 @@ bool QWindowsTabletSupport::translateTabletPacketEvent()
// Positions should be almost the same if we are in absolute
// mode. If they are not, use the mouse location.
- if ((mouseLocation - globalPos).manhattanLength() > absoluteRange) {
+ if ((mouseLocation - globalPos).manhattanLength() > m_absoluteRange) {
globalPos = mouseLocation;
globalPosF = globalPos;
}