Silence "same window" warning when QPA doesn't give touch dest window

Platform plugins should dispatch events to specific windows when
possible; but eglfs currently doesn't do that, so this warning was
printing for many touch events.  Now we print it only if the window that
the platform plugin says *should* handle a touch move or release is
non-null and *different* than the one that actually handled the press.

Fixes: QTBUG-88192
Change-Id: Ia3271b5e67902dcf8a1cdae605adec470c3cfd89
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
This commit is contained in:
Shawn Rutledge 2020-11-05 10:08:49 +01:00
parent 4ccfe7b734
commit 2f71d9d837

View File

@ -2879,17 +2879,15 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
break;
case QEventPoint::State::Released:
if (Q_UNLIKELY(window != mut.window())) {
if (Q_UNLIKELY(!window.isNull() && window != mut.window()))
qCWarning(lcPtrDispatch) << "delivering touch release to same window" << mut.window() << "not" << window.data();
window = mut.window();
}
window = mut.window();
break;
default: // update or stationary
if (Q_UNLIKELY(window != mut.window())) {
if (Q_UNLIKELY(!window.isNull() && window != mut.window()))
qCWarning(lcPtrDispatch) << "delivering touch update to same window" << mut.window() << "not" << window.data();
window = mut.window();
}
window = mut.window();
break;
}
// If we somehow still don't have a window, we can't deliver this touchpoint. (should never happen)