diff options
author | Jan Arve Saether <jan-arve.saether@qt.io> | 2017-05-04 14:05:13 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-05-08 15:26:22 +0000 |
commit | d84af8b81543e200db3041f27eadc2df5c62055e (patch) | |
tree | cb279bbeee1d3f4c1fbe8d0475f4d5739a5a50d4 /src/quick/items/qquickwindow.cpp | |
parent | a3c9fb78cb33c29d49dbe83d0525c5935e77beed (diff) |
Only send filtered events to the parent of the receiver
If receiver is nullptr, all filteringParentItems are candidates for
filtering.
Change-Id: I9c388a9a2e83c1f5815c99c059f0e507e0bc1040
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index b536ae3804..289e1eabec 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2710,6 +2710,8 @@ bool QQuickWindowPrivate::sendFilteredPointerEvent(QQuickPointerEvent *event, QQ QVarLengthArray<QPair<QQuickPointerHandler *, QQuickEventPoint *>, 32> passiveGrabsToCancel; for (QPair<QQuickItem *,QQuickItem *> itemAndParent : filteringParentItems) { QQuickItem *item = receiver ? receiver : itemAndParent.first; + if (item != itemAndParent.first) + continue; if (!item->acceptTouchEvents() && !item->acceptedMouseButtons()) continue; // if this item won't accept, parents don't need to filter the touch for it QQuickItem *filteringParent = itemAndParent.second; |