aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/TextInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/input/TextInput.cpp')
-rw-r--r--src/managers/input/TextInput.cpp7
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);
}