From bd7f9aad053866d5ca07195a79c1c7a1b060a8c1 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 1 Jan 2026 14:48:32 +0100 Subject: input/ti: avoid sending events to inactive TIs ref https://github.com/hyprwm/Hyprland/discussions/12105 --- src/managers/input/InputMethodRelay.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/managers/input/InputMethodRelay.cpp') diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index 15dd249e..6ee3c836 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -75,6 +75,11 @@ CTextInput* CInputMethodRelay::getFocusedTextInput() { if (!Desktop::focusState()->surface()) return nullptr; + for (auto const& ti : m_textInputs) { + if (ti->focusedSurface() == Desktop::focusState()->surface() && ti->isEnabled()) + return ti.get(); + } + for (auto const& ti : m_textInputs) { if (ti->focusedSurface() == Desktop::focusState()->surface()) return ti.get(); -- cgit v1.2.3