From c51de0f3706c1827d21ea45034213a8ce91f1d48 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 23 Jul 2021 09:20:43 +0300 Subject: [PATCH] wayland: Don't track last focused internal window QGuiApplication::focusWindow() can be used instead. --- src/input.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index ddd0a247c0..b0cd73c235 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -990,8 +990,7 @@ class InternalWindowEventFilter : public InputEventFilter { break; } } - if (m_lastFocus != found) { - m_lastFocus = found; + if (QGuiApplication::focusWindow() != found) { QWindowSystemInterface::handleWindowActivated(found); } if (!found) { @@ -1098,7 +1097,6 @@ private: QSet m_pressedIds; QPointF m_lastGlobalTouchPos; QPointF m_lastLocalTouchPos; - QPointer m_lastFocus; }; class DecorationEventFilter : public InputEventFilter {