diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2022-05-03 10:59:43 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-05-04 08:27:18 +0000 |
commit | 14bb5b8a86bbaf6b97ddf217b1dd99c8cac2efd9 (patch) | |
tree | 38f38f6513cbe9c003aedd57bcc0f2fcfcc055ee | |
parent | a43a09f940fa972d6f953162cab7117d7a25caed (diff) | |
download | qtwayland-14bb5b8a86bbaf6b97ddf217b1dd99c8cac2efd9.tar.gz |
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.
Fixes: QTBUG-102829
Change-Id: Idc99c56a7cc8651da844be3ea238b8537891dd1f
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 256c89e63f26c255e88f375da7d70dd0483814e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem_p.h | 1 |
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 d25f21f1..4c85d882 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; } |