aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickdraghandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-11-29 14:50:05 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-02-10 13:04:47 +0000
commit50aaca40fe09a3ab6c927f7a550b2e97cf332a9c (patch)
tree9353a10e848499b14ff8ae0254cbfde67dbce721 /src/quick/handlers/qquickdraghandler.cpp
parent02f430462b4e9256b6ae021e3d415c0d2180404d (diff)
start making explicit exclusive or passive grabs
Change-Id: I4a6e3c72d69e893fec2e39f4faab24af6d00c7e0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickdraghandler.cpp')
-rw-r--r--src/quick/handlers/qquickdraghandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp
index 6caee6be13..9575f7ede9 100644
--- a/src/quick/handlers/qquickdraghandler.cpp
+++ b/src/quick/handlers/qquickdraghandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQuick module of the Qt Toolkit.
@@ -80,6 +80,7 @@ void QQuickDragHandler::handleEventPoint(QQuickEventPoint *point)
case QQuickEventPoint::Pressed:
if (target() && target()->parentItem())
m_startPos = target()->parentItem()->mapToScene(target()->position());
+ setPassiveGrab(point);
break;
case QQuickEventPoint::Updated: {
QPointF delta = point->scenePos() - point->scenePressPos();
@@ -96,7 +97,7 @@ void QQuickDragHandler::handleEventPoint(QQuickEventPoint *point)
}
} else if ((m_xAxis.enabled() && QQuickWindowPrivate::dragOverThreshold(delta.x(), Qt::XAxis, point)) ||
(m_yAxis.enabled() && QQuickWindowPrivate::dragOverThreshold(delta.y(), Qt::YAxis, point))) {
- setGrab(point, true);
+ setExclusiveGrab(point);
}
} break;
default: