diff options
Diffstat (limited to 'src/gui/inputmethod/qwsinputcontext_qws.cpp')
-rw-r--r-- | src/gui/inputmethod/qwsinputcontext_qws.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/inputmethod/qwsinputcontext_qws.cpp b/src/gui/inputmethod/qwsinputcontext_qws.cpp index 46ac13d..6180c48 100644 --- a/src/gui/inputmethod/qwsinputcontext_qws.cpp +++ b/src/gui/inputmethod/qwsinputcontext_qws.cpp @@ -73,10 +73,17 @@ void QWSInputContext::reset() void QWSInputContext::setFocusWidget( QWidget *w ) { - QWidget *oldFocus = focusWidget(); + QWidget *oldFocus = focusWidget(); if (oldFocus == w) return; + if (w) { + QWSInputContext::updateImeStatus(w, true); + } else { + if (oldFocus) + QWSInputContext::updateImeStatus(oldFocus, false); + } + if (oldFocus) { QWidget *tlw = oldFocus->window(); int winid = tlw->internalWinId(); @@ -224,7 +231,7 @@ bool QWSInputContext::translateIMEvent(QWidget *w, const QWSIMEvent *e) Q_GUI_EXPORT void (*qt_qws_inputMethodStatusChanged)(QWidget*) = 0; -void QInputContextPrivate::updateImeStatus(QWidget *w, bool hasFocus) +void QWSInputContext::updateImeStatus(QWidget *w, bool hasFocus) { Q_UNUSED(hasFocus); |