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 <volker.hilsheimer@qt.io>
(cherry picked from commit 45a65cbeb2775da71d4e7b417b45d54341a3ee7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Shawn Rutledge 2020-11-20 21:15:31 +01:00 committed by Qt Cherry-pick Bot
parent 2acf1122ea
commit 9f0491b8c6

View File

@ -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<QWindow *>::const_iterator winIt = windowsNeedingCancel.constBegin(),