91bool QQuickPointHandler::wantsEventPoint(
const QPointerEvent *event,
const QEventPoint &point)
95 const bool trackedPointId = QQuickSinglePointHandler::point().id() == point.id() &&
96 QQuickSinglePointHandler::point().device() == point.device();
97 if ((point.state() == QEventPoint::Pressed && QQuickSinglePointHandler::wantsEventPoint(event, point))
98 || (QQuickDeliveryAgentPrivate::isSynthMouse(event) && trackedPointId)) {
99 for (
const QObject *grabber : event->passiveGrabbers(point)) {
100 if (grabber && grabber !=
this && grabber->parent() == parent() &&
101 grabber->metaObject()->className() == metaObject()->className())
107 return (point.state() != QEventPoint::Pressed && trackedPointId);
110void QQuickPointHandler::handleEventPoint(QPointerEvent *event, QEventPoint &point)
112 switch (point.state()) {
113 case QEventPoint::Pressed:
114 if (acceptedButtons() == Qt::NoButton || !event->isSinglePointEvent() ||
115 (
static_cast<
const QSinglePointEvent *>(event)->buttons() & acceptedButtons()) != Qt::NoButton) {
116 setPassiveGrab(event, point);
120 case QEventPoint::Released:
121 if (acceptedButtons() == Qt::NoButton || !event->isSinglePointEvent() ||
122 (
static_cast<
const QSinglePointEvent *>(event)->buttons() & acceptedButtons()) == Qt::NoButton)
128 point.setAccepted(
false);
129 emit translationChanged();
130 if (!QQuickDeliveryAgentPrivate::isSynthMouse(event))
131 QQuickSinglePointHandler::handleEventPoint(event, point);