diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstabletsupport.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowstabletsupport.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/src/plugins/platforms/windows/qwindowstabletsupport.cpp index 8ceab02311..d1737de907 100644 --- a/src/plugins/platforms/windows/qwindowstabletsupport.cpp +++ b/src/plugins/platforms/windows/qwindowstabletsupport.cpp @@ -465,7 +465,9 @@ bool QWindowsTabletSupport::translateTabletPacketEvent() const double degY = atan(cos(radAzim) / tanAlt); tiltX = int(degX * (180 / M_PI)); tiltY = int(-degY * (180 / M_PI)); - rotation = packet.pkOrientation.orTwist; + rotation = 360.0 - (packet.pkOrientation.orTwist / 10.0); + if (rotation > 180.0) + rotation -= 360.0; } if (QWindowsContext::verbose > 1) { @@ -477,8 +479,9 @@ bool QWindowsTabletSupport::translateTabletPacketEvent() << tiltY << "tanP:" << tangentialPressure << "rotation:" << rotation; } - QWindowSystemInterface::handleTabletEvent(target, packet.pkButtons, localPos, globalPosF, + QWindowSystemInterface::handleTabletEvent(target, QPointF(localPos), globalPosF, currentDevice, currentPointer, + static_cast<Qt::MouseButtons>(packet.pkButtons), pressureNew, tiltX, tiltY, tangentialPressure, rotation, z, m_devices.at(m_currentDevice).uniqueId, |