aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSungyoon Cho <[email protected]>2024-09-02 04:33:31 +0900
committerGitHub <[email protected]>2024-09-01 21:33:31 +0200
commit6934e7aa2b300bc4565855a4092fb34de8a9a8d2 (patch)
treeab58201bfad5825746abc24f8ab047ef267f99a9
parent8bbeee20414bc0e20992076632d7d44ede443a1c (diff)
downloadHyprland-6934e7aa2b300bc4565855a4092fb34de8a9a8d2.tar.gz
Hyprland-6934e7aa2b300bc4565855a4092fb34de8a9a8d2.zip
textinput: don't deactivate ime if another ti is focused (#7617)
-rw-r--r--src/managers/input/TextInput.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp
index 711935a7..de14f1ab 100644
--- a/src/managers/input/TextInput.cpp
+++ b/src/managers/input/TextInput.cpp
@@ -23,8 +23,9 @@ void CTextInput::initCallbacks() {
listeners.disable = INPUT->events.disable.registerListener([this](std::any p) { onDisabled(); });
listeners.commit = INPUT->events.onCommit.registerListener([this](std::any p) { onCommit(); });
listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) {
- g_pInputManager->m_sIMERelay.deactivateIME(this);
g_pInputManager->m_sIMERelay.removeTextInput(this);
+ if (!g_pInputManager->m_sIMERelay.getFocusedTextInput())
+ g_pInputManager->m_sIMERelay.deactivateIME(this);
});
} else {
const auto INPUT = pV1Input.lock();
@@ -38,8 +39,9 @@ void CTextInput::initCallbacks() {
listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) {
listeners.surfaceUnmap.reset();
listeners.surfaceDestroy.reset();
- g_pInputManager->m_sIMERelay.deactivateIME(this);
g_pInputManager->m_sIMERelay.removeTextInput(this);
+ if (!g_pInputManager->m_sIMERelay.getFocusedTextInput())
+ g_pInputManager->m_sIMERelay.deactivateIME(this);
});
}
}