diff options
Diffstat (limited to 'src/quick/handlers/qquicktaphandler.cpp')
-rw-r--r-- | src/quick/handlers/qquicktaphandler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index 61f97868e8..276b80abaa 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -140,17 +140,16 @@ bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point) } break; case QQuickEventPoint::Stationary: - // Never react in any way when the point hasn't moved. - // In autotests, the point's position may not even be correct, because - // QTest::touchEvent(window, touchDevice).stationary(1) - // provides no opportunity to give a position, so it ends up being random. + // If the point hasn't moved since last time, the return value should be the same as last time. + // If we return false here, QQuickPointerHandler::handlePointerEvent() will call setActive(false). + ret = point->pointId() == this->point().id(); break; } // If this is the grabber, returning false from this function will cancel the grab, // so onGrabChanged(this, CancelGrabExclusive, point) and setPressed(false) will be called. // But when m_gesturePolicy is DragThreshold, we don't get an exclusive grab, but // we still don't want to be pressed anymore. - if (!ret && point->pointId() == this->point().id() && point->state() != QQuickEventPoint::Stationary) + if (!ret && point->pointId() == this->point().id()) setPressed(false, true, point); return ret; } |