0134d56
From e58a94011ac612496b48b76684f8271d11b98ff0 Mon Sep 17 00:00:00 2001
faff1df
From: Albert Astals Cid <aacid@kde.org>
faff1df
Date: Tue, 16 Nov 2021 22:43:37 +0100
0134d56
Subject: [PATCH 04/30] Revert "Fix TapHandler so that it actually registers a
faff1df
 tap"
faff1df
faff1df
This reverts commit 36e8ccd434f948e4f11a8f9d59139ec072e41ff5.
faff1df
faff1df
It's causing regresions
faff1df
---
faff1df
 src/quick/handlers/qquickhandlerpoint.cpp       | 4 ++--
faff1df
 src/quick/handlers/qquicksinglepointhandler.cpp | 4 ++--
faff1df
 2 files changed, 4 insertions(+), 4 deletions(-)
faff1df
faff1df
diff --git a/src/quick/handlers/qquickhandlerpoint.cpp b/src/quick/handlers/qquickhandlerpoint.cpp
b0486fb
index 02141b9a9e..7103206470 100644
faff1df
--- a/src/quick/handlers/qquickhandlerpoint.cpp
faff1df
+++ b/src/quick/handlers/qquickhandlerpoint.cpp
faff1df
@@ -82,7 +82,7 @@ void QQuickHandlerPoint::localize(QQuickItem *item)
faff1df
 
faff1df
 void QQuickHandlerPoint::reset()
faff1df
 {
faff1df
-    m_id = -1;
faff1df
+    m_id = 0;
faff1df
     m_uniqueId = QPointingDeviceUniqueId();
faff1df
     m_position = QPointF();
faff1df
     m_scenePosition = QPointF();
faff1df
@@ -165,7 +165,7 @@ void QQuickHandlerPoint::reset(const QVector<QQuickHandlerPoint> &points)
faff1df
         pressureSum += point.pressure();
faff1df
         ellipseDiameterSum += point.ellipseDiameters();
faff1df
     }
faff1df
-    m_id = -1;
faff1df
+    m_id = 0;
faff1df
     m_uniqueId = QPointingDeviceUniqueId();
faff1df
     // all points are required to be from the same event, so pressed buttons and modifiers should be the same
faff1df
     m_pressedButtons = points.first().pressedButtons();
faff1df
diff --git a/src/quick/handlers/qquicksinglepointhandler.cpp b/src/quick/handlers/qquicksinglepointhandler.cpp
b0486fb
index a508de455d..d785d8c0ca 100644
faff1df
--- a/src/quick/handlers/qquicksinglepointhandler.cpp
faff1df
+++ b/src/quick/handlers/qquicksinglepointhandler.cpp
faff1df
@@ -75,7 +75,7 @@ bool QQuickSinglePointHandler::wantsPointerEvent(QQuickPointerEvent *event)
faff1df
     if (!QQuickPointerDeviceHandler::wantsPointerEvent(event))
faff1df
         return false;
faff1df
 
faff1df
-    if (d->pointInfo.id() != -1) {
faff1df
+    if (d->pointInfo.id()) {
faff1df
         // We already know which one we want, so check whether it's there.
faff1df
         // It's expected to be an update or a release.
faff1df
         // If we no longer want it, cancel the grab.
faff1df
@@ -125,7 +125,7 @@ bool QQuickSinglePointHandler::wantsPointerEvent(QQuickPointerEvent *event)
faff1df
             chosen->setAccepted();
faff1df
         }
faff1df
     }
faff1df
-    return d->pointInfo.id() != -1;
faff1df
+    return d->pointInfo.id();
faff1df
 }
faff1df
 
faff1df
 void QQuickSinglePointHandler::handlePointerEventImpl(QQuickPointerEvent *event)
faff1df
-- 
0134d56
2.41.0
faff1df