diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-02-26 15:02:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-27 13:28:23 +0100 |
commit | cebdd91f8bbebf43fd2ec3c4dd2f49f46172d47e (patch) | |
tree | 3f5a2401b2fabdfcaa7a7c9c2b09055bb35bdc8f /src/plugins/platforms/windows/qwindowstabletsupport.cpp | |
parent | bbc4cc4a47bb96c8cb85b6f0dd607020e74f3e2c (diff) |
Windows: Add platform plugin parameter for tablet absolute range.
Make the range for detecting relative (mouse mode) configureable
using -platform windows:tabletabsoluterange=50
Task-number: QTBUG-36937
Change-Id: I44f928e53cb41b246c44554ec7f71bfbdf03c147
Reviewed-by: Arthur Krebsbach <Arthur.Krebsbach@Wacom.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstabletsupport.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowstabletsupport.cpp | 4 |
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; } |