aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2017-05-04 16:17:05 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-07 16:46:37 +0000
commit7286b296f97d3394f3c2a716116bd483c9874931 (patch)
tree654fee0c0fb529bb19e7b5c240fe03f87735a85a /src
parent7730affa0dd50960da90f30d41b694a9e9ddd52b (diff)
Touch child mouse filtering: pass not grabbed points inside item bounds
c2ca2cbf04071ffb3aee6af8d5ab9084dfa1c091 started to restrict delivery of items in childMouseEventFilter by checking that we wouldn't deliver completely random points outside the item that were not grabbed by child items. That is generally correct. It did no longer send along touch points that had any other state but pressed but were inside when they had no grabber. That part was wrong, points must be sent along if they are not grabbed and inside the item. Task-number: QTBUG-60368 Change-Id: Ida24f5d2310d3b71db79ae5f95da2c57dcd3f150 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickevents.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index ac0505da82..448b63c347 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -861,8 +861,9 @@ QTouchEvent *QQuickPointerTouchEvent::touchEventForItem(QQuickItem *item, bool i
}
parent = parent->parentItem();
}
- bool filterRelevant = isFiltering && grabberIsChild;
+ // when filtering, send points that are grabbed by a child and points that are not grabbed but inside
+ bool filterRelevant = isFiltering && (grabberIsChild || (!p->grabber() && item->contains(item->mapFromScene(p->scenePos()))));
if (!(isGrabber || isPressInside || filterRelevant))
continue;