diff options
| author | Sungyoon Cho <sungyoon@sungyooncho.dev> | 2024-09-10 22:49:10 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-10 14:49:10 +0100 |
| commit | 155d44016d0cb11332c454db73d59030cdbd7b13 (patch) | |
| tree | 2227b41f972fea70108bf64046c2e012f637d848 /src/managers/input/InputMethodRelay.cpp | |
| parent | 13f90bb87a697866f1bbbacd1473d04f33ec2aa7 (diff) | |
textinput: handle IME resetting (#7731)
Diffstat (limited to 'src/managers/input/InputMethodRelay.cpp')
| -rw-r--r-- | src/managers/input/InputMethodRelay.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index 1608e123..5ef7f331 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -106,20 +106,22 @@ void CInputMethodRelay::updateAllPopups() { } } -void CInputMethodRelay::activateIME(CTextInput* pInput) { +void CInputMethodRelay::activateIME(CTextInput* pInput, bool shouldCommit) { if (m_pIME.expired()) return; m_pIME->activate(); - commitIMEState(pInput); + if (shouldCommit) + commitIMEState(pInput); } -void CInputMethodRelay::deactivateIME(CTextInput* pInput) { +void CInputMethodRelay::deactivateIME(CTextInput* pInput, bool shouldCommit) { if (m_pIME.expired()) return; m_pIME->deactivate(); - commitIMEState(pInput); + if (shouldCommit) + commitIMEState(pInput); } void CInputMethodRelay::commitIMEState(CTextInput* pInput) { |
