diff options
Diffstat (limited to 'src/gui/inputmethod/qwininputcontext_win.cpp')
-rw-r--r-- | src/gui/inputmethod/qwininputcontext_win.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp index b94c604..11ee2f2 100644 --- a/src/gui/inputmethod/qwininputcontext_win.cpp +++ b/src/gui/inputmethod/qwininputcontext_win.cpp @@ -759,7 +759,12 @@ void QWinInputContext::updateImeStatus(QWidget *w, bool hasFocus) { if (!w) return; - bool e = w->testAttribute(Qt::WA_InputMethodEnabled) && w->isEnabled(); + // It's always the proxy that carries the hints. + QWidget *focusProxyWidget = w->focusProxy(); + if (!focusProxyWidget) + focusProxyWidget = w; + bool e = w->testAttribute(Qt::WA_InputMethodEnabled) && w->isEnabled() + && !(focusProxyWidget->inputMethodHints() & Qt::ImhExclusiveInputMask); bool hasIme = e && hasFocus; #ifdef Q_IME_DEBUG qDebug("%s HasFocus = %d hasIme = %d e = %d ", w->className(), hasFocus, hasIme, e); |