mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 18:25:59 +01:00
textinput: don't deactivate ime if another ti is focused (#7617)
This commit is contained in:
parent
8bbeee2041
commit
6934e7aa2b
1 changed files with 4 additions and 2 deletions
|
@ -23,8 +23,9 @@ void CTextInput::initCallbacks() {
|
||||||
listeners.disable = INPUT->events.disable.registerListener([this](std::any p) { onDisabled(); });
|
listeners.disable = INPUT->events.disable.registerListener([this](std::any p) { onDisabled(); });
|
||||||
listeners.commit = INPUT->events.onCommit.registerListener([this](std::any p) { onCommit(); });
|
listeners.commit = INPUT->events.onCommit.registerListener([this](std::any p) { onCommit(); });
|
||||||
listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) {
|
listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) {
|
||||||
g_pInputManager->m_sIMERelay.deactivateIME(this);
|
|
||||||
g_pInputManager->m_sIMERelay.removeTextInput(this);
|
g_pInputManager->m_sIMERelay.removeTextInput(this);
|
||||||
|
if (!g_pInputManager->m_sIMERelay.getFocusedTextInput())
|
||||||
|
g_pInputManager->m_sIMERelay.deactivateIME(this);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const auto INPUT = pV1Input.lock();
|
const auto INPUT = pV1Input.lock();
|
||||||
|
@ -38,8 +39,9 @@ void CTextInput::initCallbacks() {
|
||||||
listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) {
|
listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) {
|
||||||
listeners.surfaceUnmap.reset();
|
listeners.surfaceUnmap.reset();
|
||||||
listeners.surfaceDestroy.reset();
|
listeners.surfaceDestroy.reset();
|
||||||
g_pInputManager->m_sIMERelay.deactivateIME(this);
|
|
||||||
g_pInputManager->m_sIMERelay.removeTextInput(this);
|
g_pInputManager->m_sIMERelay.removeTextInput(this);
|
||||||
|
if (!g_pInputManager->m_sIMERelay.getFocusedTextInput())
|
||||||
|
g_pInputManager->m_sIMERelay.deactivateIME(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue