summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-05-03 10:59:43 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-05-04 09:29:46 +0200
commit256c89e63f26c255e88f375da7d70dd0483814e8 (patch)
treed49c7ca2748ec73fe8e61a84c70e85f6b709ab02
parent4910b7adfa706520cd5180d5384b999488550aef (diff)
Compositor: Re-enable touch events for Wayland clients
As documented, setAcceptTouchEvents() would be implicit in calling setAcceptedMouseButtons() in Qt 5, but in Qt 6, this was changed. The result was that QWaylandQuickItems would never receive any touch events in Qt 6, even though the touchEventsEnabled flag is set by default. To fix this, we add an explicit call to setAcceptTouchEvents() to ensure the same behavior as we had in Qt 5. [ChangeLog][QtWaylandCompositor] Fixed a bug where multi-touch would not work with Qt Wayland Compositor. Pick-to: 6.2 6.3 Fixes: QTBUG-102829 Change-Id: Idc99c56a7cc8651da844be3ea238b8537891dd1f Reviewed-by: Liang Qi <liang.qi@qt.io>
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem_p.h b/src/compositor/compositor_api/qwaylandquickitem_p.h
index d25f21f1a..4c85d8820 100644
--- a/src/compositor/compositor_api/qwaylandquickitem_p.h
+++ b/src/compositor/compositor_api/qwaylandquickitem_p.h
@@ -137,6 +137,7 @@ public:
Qt::ExtraButton5 | Qt::ExtraButton6 | Qt::ExtraButton7 | Qt::ExtraButton8 |
Qt::ExtraButton9 | Qt::ExtraButton10 | Qt::ExtraButton11 |
Qt::ExtraButton12 | Qt::ExtraButton13) : Qt::NoButton);
+ q->setAcceptTouchEvents(enable);
q->setAcceptHoverEvents(enable);
inputEventsEnabled = enable;
}