wayland: Don't track last focused internal window

QGuiApplication::focusWindow() can be used instead.
This commit is contained in:
Vlad Zahorodnii 2021-07-23 09:20:43 +03:00
parent dd6a60beea
commit c51de0f370

View file

@ -990,8 +990,7 @@ class InternalWindowEventFilter : public InputEventFilter {
break; break;
} }
} }
if (m_lastFocus != found) { if (QGuiApplication::focusWindow() != found) {
m_lastFocus = found;
QWindowSystemInterface::handleWindowActivated(found); QWindowSystemInterface::handleWindowActivated(found);
} }
if (!found) { if (!found) {
@ -1098,7 +1097,6 @@ private:
QSet<qint32> m_pressedIds; QSet<qint32> m_pressedIds;
QPointF m_lastGlobalTouchPos; QPointF m_lastGlobalTouchPos;
QPointF m_lastLocalTouchPos; QPointF m_lastLocalTouchPos;
QPointer<QWindow> m_lastFocus;
}; };
class DecorationEventFilter : public InputEventFilter { class DecorationEventFilter : public InputEventFilter {