summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInho Lee <inho.lee@qt.io>2024-04-30 12:05:35 +0200
committerInho Lee <inho.lee@qt.io>2024-04-30 19:14:25 +0200
commita1452b95f7758b059ef6994f09b2b9d88a0aa677 (patch)
tree9c8cdd914978da8ca6848b47b561cce8ee8d392e
parentbe29771bbe602eb5eb327860f7a88b6533cc47c8 (diff)
Make wheel operations compatible with xcb
On xcb, Alt modifier makes wheel operations horizontal. Fixes: QTBUG-124807 Pick-to: 6.7 6.5 Change-Id: I98cfe14b4df91169a5ff4e777ebe954087747e17 Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/client/qwaylandinputdevice.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 1df7ac483..ce04971ba 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -892,8 +892,10 @@ public:
WheelEvent(QWaylandWindow *surface, Qt::ScrollPhase phase, ulong timestamp, const QPointF &local,
const QPointF &global, const QPoint &pixelDelta, const QPoint &angleDelta,
Qt::MouseEventSource source, Qt::KeyboardModifiers modifiers, bool inverted)
- : QWaylandPointerEvent(QEvent::Wheel, phase, surface, timestamp,
- local, global, pixelDelta, angleDelta, source, modifiers, inverted)
+ : QWaylandPointerEvent(QEvent::Wheel, phase, surface, timestamp, local, global,
+ modifiers & Qt::AltModifier ? pixelDelta.transposed() : pixelDelta,
+ modifiers & Qt::AltModifier ? angleDelta.transposed() : angleDelta,
+ source, modifiers, inverted)
{
}
};