textinput: handle IME resetting (#7731)

This commit is contained in:
Sungyoon Cho 2024-09-10 22:49:10 +09:00 committed by GitHub
parent 13f90bb87a
commit 155d44016d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 49 additions and 19 deletions

View file

@ -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) {