diff options
author | Vladimir Belyavsky <belyavskyv@gmail.com> | 2022-12-14 12:55:16 +0300 |
---|---|---|
committer | Vladimir Belyavsky <belyavskyv@gmail.com> | 2022-12-17 07:29:06 +0300 |
commit | 1309bac26b71d184c924237ba3c8723aa79b5ba1 (patch) | |
tree | 83c412f16721c8d46eb02be6187b8676338c59dd /src/quick/items/qquickitem.cpp | |
parent | e9b7eaaf6e627c84cf77dc0ea76c9cb40d705711 (diff) |
QQDAPrivate::deliverUpdatedPoints: skip HoverHandlers if wheel event
This complements 85db031c3f449cbeba41eb5667cf6725cca8b32d.
When delivering a mouse wheel event, we shouldn't just pass it
to the item's HoverHandler, because those are normally visited in
QQuickDeliveryAgentPrivate::deliverHoverEventToItem().
Pick-to: 6.4 6.5
Fixes: QTBUG-108600
Fixes: QTBUG-108601
Change-Id: Ie6066807f80140e1007347413f1095f98f6cb5c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 32009939df..ccbb8c557f 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -5561,8 +5561,8 @@ bool QQuickItemPrivate::anyPointerHandlerWants(const QPointerEvent *event, const /*! \internal Deliver the \a event to all this item's PointerHandlers, but skip - HoverHandlers if the event is a QMouseEvent (they are visited in - QQuickDeliveryAgentPrivate::deliverHoverEventToItem()), and skip handlers + HoverHandlers if the event is a QMouseEvent or QWheelEvent (they are visited + in QQuickDeliveryAgentPrivate::deliverHoverEventToItem()), and skip handlers that are in QQuickPointerHandlerPrivate::deviceDeliveryTargets(). If \a avoidGrabbers is true, also skip delivery to any handler that is exclusively or passively grabbing any point within \a event @@ -5574,7 +5574,7 @@ bool QQuickItemPrivate::handlePointerEvent(QPointerEvent *event, bool avoidGrabb if (extra.isAllocated()) { for (QQuickPointerHandler *handler : extra->pointerHandlers) { bool avoidThisHandler = false; - if (QQuickDeliveryAgentPrivate::isMouseEvent(event) && + if (QQuickDeliveryAgentPrivate::isMouseOrWheelEvent(event) && qmlobject_cast<const QQuickHoverHandler *>(handler)) { avoidThisHandler = true; } else if (avoidGrabbers) { |