textinput: handle IME resetting (#7731)
This commit is contained in:
parent
13f90bb87a
commit
155d44016d
8 changed files with 49 additions and 19 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue