diff options
author | Sungyoon Cho <[email protected]> | 2024-09-16 01:31:38 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-15 17:31:38 +0100 |
commit | eb97d949aa31b900d9735bcb8ead47acddc1f339 (patch) | |
tree | 7239128c0c90991f13827e8353b1644c79b604c1 | |
parent | e74efd87e5aa38f9cf84cb3848ee1ab26e5e4bcb (diff) | |
download | Hyprland-eb97d949aa31b900d9735bcb8ead47acddc1f339.tar.gz Hyprland-eb97d949aa31b900d9735bcb8ead47acddc1f339.zip |
textinput: don't reset if ti isn't enabled (#7798)
-rw-r--r-- | src/managers/input/TextInput.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp index e601ad9a..f7a6a350 100644 --- a/src/managers/input/TextInput.cpp +++ b/src/managers/input/TextInput.cpp @@ -99,6 +99,13 @@ void CTextInput::onReset() { if (g_pInputManager->m_sIMERelay.m_pIME.expired()) return; + if (!focusedSurface()) + return; + + const auto PFOCUSEDTI = g_pInputManager->m_sIMERelay.getFocusedTextInput(); + if (!PFOCUSEDTI || PFOCUSEDTI != this) + return; + g_pInputManager->m_sIMERelay.deactivateIME(this, false); g_pInputManager->m_sIMERelay.activateIME(this); } |