aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-04-03 11:37:03 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2017-05-22 19:12:12 +0000
commit48011c2dfeb83b4fe717034d4b3c353714fead48 (patch)
tree836196ff3c97c7085b5c9e7a4be052ad02759b33 /src/quick/items/qquickwindow_p.h
parenta09b2f6fcd087e849f4e766a03c1ab47ae49d0d7 (diff)
Start over with event delivery when touchpoint releases occur
The new rule is that when the number of touchpoints changes, we start over with event delivery as if the touch had just begun, to give more opportunities to hand off processing from one item or handler to another. And MultiPointTouchArea can now handle the handoff: for example in tests/manual/pointer/pinchDragFlingMPTA.qml when the user is pressing three fingers, the PinchHandler is active; when the user then lifts one finger, the MPTA can resume handling the two remaining touchpoints as if they were just pressed. The change in QQuickMultiPointerHandler::wantsPointerEvent is both a behavior change and an optimization: released points aren't eligible; but if some points are released, then pressed, updated and stationary points are all eligible. And, figure this out without looping over the points twice. Change-Id: I26b7593de8e72b471adfec4a4482dd87a8288442 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow_p.h')
-rw-r--r--src/quick/items/qquickwindow_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index f66809cc8a..fa39eca9a6 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -168,9 +168,9 @@ public:
void deliverPointerEvent(QQuickPointerEvent *);
void deliverTouchEvent(QQuickPointerTouchEvent *);
bool deliverTouchCancelEvent(QTouchEvent *);
- bool deliverPressEvent(QQuickPointerEvent *);
+ bool deliverPressOrReleaseEvent(QQuickPointerEvent *, bool handlersOnly = false);
void deliverUpdatedTouchPoints(QQuickPointerTouchEvent *event);
- void deliverMatchingPointsToItem(QQuickItem *item, QQuickPointerEvent *pointerEvent);
+ void deliverMatchingPointsToItem(QQuickItem *item, QQuickPointerEvent *pointerEvent, bool handlersOnly = false);
QVector<QQuickItem *> pointerTargets(QQuickItem *, const QPointF &, bool checkMouseButtons, bool checkAcceptsTouch) const;
QVector<QQuickItem *> mergePointerTargets(const QVector<QQuickItem *> &list1, const QVector<QQuickItem *> &list2) const;