aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-07-29 16:16:36 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-07-29 14:20:37 +0000
commitbafb73b22a601eeae490b8225b33b39bf2d337e2 (patch)
tree4080ba8558beec58e7e51e35f760b14b1b0a355b /src/quick/items/qquickwindow.cpp
parentfb711c1b9c93313cc19719d11b6611fc79467903 (diff)
Accept points inside QQuickPointerEvent
Before the points for move events were not accepted, which is inconsistent. We know that we can stop delivering as soon as all points are accepted. Change-Id: I48d286be715eca16771e9ec0b107398fafb94194 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 8895a43faa..e3c80a8638 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2274,11 +2274,10 @@ bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, const QQ
// If the touch was accepted (regardless by whom or in what form),
// update acceptedNewPoints.
for (auto point: qAsConst(touchEvent->touchPoints())) {
- if (point.state() == Qt::TouchPointPressed) {
- auto pointerEventPoint = event->pointById(point.id());
- pointerEventPoint->setAccepted();
+ auto pointerEventPoint = event->pointById(point.id());
+ pointerEventPoint->setAccepted();
+ if (point.state() == Qt::TouchPointPressed)
pointerEventPoint->setGrabber(item);
- }
}
} else {
// But if the event was not accepted then we know this item