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); }