From dff8816c768747fedfaf071b8becb7e91b5da65b Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 27 Dec 2024 02:46:08 +0100 Subject: [PATCH] QWaylandTablet: Use floating point tilt Change-Id: Ib8476fd74ade7c50cf36909fd9148c78f21c83b1 Reviewed-by: David Edmundson --- src/plugins/platforms/wayland/qwaylandtabletv2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandtabletv2.cpp b/src/plugins/platforms/wayland/qwaylandtabletv2.cpp index cca00ca7d35..ce5261d0c62 100644 --- a/src/plugins/platforms/wayland/qwaylandtabletv2.cpp +++ b/src/plugins/platforms/wayland/qwaylandtabletv2.cpp @@ -550,8 +550,8 @@ void QWaylandTabletToolV2::zwp_tablet_tool_v2_frame(uint32_t time) Qt::MouseButtons buttons = m_pending.down ? Qt::MouseButton::LeftButton : Qt::MouseButton::NoButton; buttons |= m_pending.buttons; qreal pressure = m_pending.pressure; - int xTilt = int(m_pending.xTilt); - int yTilt = int(m_pending.yTilt); + qreal xTilt = m_pending.xTilt; + qreal yTilt = m_pending.yTilt; qreal tangentialPressure = m_pending.slider; qreal rotation = m_pending.rotation; int z = int(m_pending.distance);