diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-27 11:22:57 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-31 13:33:14 +0200 |
commit | 23c9d4c98f3c6729b56700edc1d7144b444b16db (patch) | |
tree | 27b20ccbf3c101dbc7bcb1e509882b6c7fc75962 /src/plugins/platforms/windows/qwindowstabletsupport.cpp | |
parent | f69a5857d115786f44d053e68c36f74526020e82 (diff) | |
parent | 0ef66e98ccf4946a0e4513ab5fc157df0f0aca4e (diff) |
Merge branch '5.11' into dev
Conflicts:
qmake/library/qmakebuiltins.cpp
src/plugins/platforms/windows/qwindowstabletsupport.h
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbconnection.h
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/plugins/platforms/xcb/qxcbwindow.cpp
src/widgets/styles/qstylesheetstyle.cpp
tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
Done-With: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstabletsupport.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowstabletsupport.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/src/plugins/platforms/windows/qwindowstabletsupport.cpp index dad3e9df9f..2ab59b11ca 100644 --- a/src/plugins/platforms/windows/qwindowstabletsupport.cpp +++ b/src/plugins/platforms/windows/qwindowstabletsupport.cpp @@ -486,11 +486,8 @@ bool QWindowsTabletSupport::translateTabletPacketEvent() const int z = currentDevice == QTabletEvent::FourDMouse ? int(packet.pkZ) : 0; - // This code is to delay the tablet data one cycle to sync with the mouse location. - QPointF globalPosF = m_oldGlobalPosF; - const QPointF currentGlobalPosF = + QPointF globalPosF = m_devices.at(m_currentDevice).scaleCoordinates(packet.pkX, packet.pkY, virtualDesktopArea); - m_oldGlobalPosF = currentGlobalPosF; QWindow *target = QGuiApplicationPrivate::tabletDevicePoint(uniqueId).target; // Pass to window that grabbed it. @@ -498,10 +495,10 @@ bool QWindowsTabletSupport::translateTabletPacketEvent() const QPoint mouseLocation = QWindowsCursor::mousePosition(); if (m_state == PenProximity) { m_state = PenDown; - m_mode = (mouseLocation - currentGlobalPosF).manhattanLength() > m_absoluteRange + m_mode = (mouseLocation - globalPosF).manhattanLength() > m_absoluteRange ? MouseMode : PenMode; qCDebug(lcQpaTablet) << __FUNCTION__ << "mode=" << m_mode << "pen:" - << currentGlobalPosF << "mouse:" << mouseLocation; + << globalPosF << "mouse:" << mouseLocation; } if (m_mode == MouseMode) globalPosF = mouseLocation; |