diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-05 10:08:49 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-10 16:53:31 +0100 |
commit | 2f71d9d837ad50428dc86ca80496b16b8140b2bf (patch) | |
tree | 141603c01317039110225123492e4929c29a7d7f | |
parent | 4ccfe7b7347325e801f77e53075a702693cafeb2 (diff) |
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>
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a57b34a3d9..f7e07092dd 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -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) |