aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickswipedelegate.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-08-16 20:37:43 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-08-16 20:37:43 +0300
commitbbd4a25e456a2922ff71d9cbe9a8b7f656e753ad (patch)
tree560da0e7bf6e3546ac4fdd9826213c8a1568d407 /src/quicktemplates2/qquickswipedelegate.cpp
parenta970e15d7281d2d13485a486c6debadf46ed7950 (diff)
parent05522a30193a3090dd7cae26b36d675ae1f18e08 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.6' into tqtc/lts-5.15-opensourcev5.15.6-lts-lgpl
Diffstat (limited to 'src/quicktemplates2/qquickswipedelegate.cpp')
-rw-r--r--src/quicktemplates2/qquickswipedelegate.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp
index b2627f32..629bf23d 100644
--- a/src/quicktemplates2/qquickswipedelegate.cpp
+++ b/src/quicktemplates2/qquickswipedelegate.cpp
@@ -801,9 +801,10 @@ bool QQuickSwipeDelegatePrivate::handleMouseMoveEvent(QQuickItem *item, QMouseEv
const QPointF mappedEventPos = item->mapToItem(q, event->pos());
const qreal distance = (mappedEventPos - pressPoint).x();
if (!q->keepMouseGrab()) {
- // Taken from QQuickDrawerPrivate::grabMouse; see comments there.
- int threshold = qMax(20, QGuiApplication::styleHints()->startDragDistance() + 5);
- const bool overThreshold = QQuickWindowPrivate::dragOverThreshold(distance, Qt::XAxis, event, threshold);
+ // We used to use the custom threshold that QQuickDrawerPrivate::grabMouse used,
+ // but since it's larger than what Flickable uses, it results in Flickable
+ // stealing events from us (QTBUG-50045), so now we use the default.
+ const bool overThreshold = QQuickWindowPrivate::dragOverThreshold(distance, Qt::XAxis, event);
if (window && overThreshold) {
QQuickItem *grabber = q->window()->mouseGrabberItem();
if (!grabber || !grabber->keepMouseGrab()) {