From edef70185c8a46fea205b781828058c7c0e03326 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 20 Nov 2020 21:15:31 +0100 Subject: QGuiAppPriv: don't clear target and window for TouchCancel It's nice not to leave garbage in QPointingDevicePrivate::activePoints between events; on the other hand, this garbage doesn't matter, because every press event sets the target and window independently, without caring what was stored there from before. But it was wrong to clear it before we've even delivered the TouchCancel event. Change-Id: I924039a7c7a8ed75f420d1837c63dc19d3cc98b6 Reviewed-by: Volker Hilsheimer (cherry picked from commit 45a65cbeb2775da71d4e7b417b45d54341a3ee7f) Reviewed-by: Qt Cherry-pick Bot --- src/gui/kernel/qguiapplication.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index d396f11efb..05933bac6a 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2816,8 +2816,6 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To QWindow *w = mut.window(); if (w) windowsNeedingCancel.insert(w); - mut.setWindow(nullptr); - mut.setTarget(nullptr); } for (QSet::const_iterator winIt = windowsNeedingCancel.constBegin(), -- cgit v1.2.3