From 426dc2fbefa8a901778c5fbafe6fb9ac61c4a004 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 5 Jun 2009 15:53:56 +0200 Subject: Turned off input methods on Windows when using certain hints. If any of those hints are present, complex input is not possible, so input methods should be turned off on Windows. --- src/gui/inputmethod/qwininputcontext_win.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp index e3e8aa4..d670f5a 100644 --- a/src/gui/inputmethod/qwininputcontext_win.cpp +++ b/src/gui/inputmethod/qwininputcontext_win.cpp @@ -759,7 +759,12 @@ void QInputContextPrivate::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); -- cgit v0.12