diff options
| author | Sungyoon Cho <sungyoon@sungyooncho.dev> | 2024-04-06 23:54:02 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-06 15:54:02 +0100 |
| commit | 04d067d78b0074ff0000b4ce2d8741881b1ace25 (patch) | |
| tree | 34d1c5b6947b830446f5160ace7551a2bb348529 /src/managers/input/InputMethodRelay.cpp | |
| parent | 1596e2d1f7db76c4a367a6beb814d79db019d8d2 (diff) | |
IME: fix race condition on closing window (#5455)
Diffstat (limited to 'src/managers/input/InputMethodRelay.cpp')
| -rw-r--r-- | src/managers/input/InputMethodRelay.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index e348dcaf..8c21247a 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -160,6 +160,25 @@ void CInputMethodRelay::updateAllPopups() { } } +void CInputMethodRelay::activateIME(CTextInput* pInput) { + if (!m_pWLRIME) + return; + + wlr_input_method_v2_send_activate(g_pInputManager->m_sIMERelay.m_pWLRIME); + commitIMEState(pInput); +} + +void CInputMethodRelay::deactivateIME(CTextInput* pInput) { + if (!m_pWLRIME) + return; + + if (!m_pWLRIME->active) + return; + + wlr_input_method_v2_send_deactivate(g_pInputManager->m_sIMERelay.m_pWLRIME); + commitIMEState(pInput); +} + void CInputMethodRelay::commitIMEState(CTextInput* pInput) { if (!m_pWLRIME) return; |
