summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-06-05 13:53:56 (GMT)
committeraxis <qt-info@nokia.com>2009-06-05 13:55:15 (GMT)
commit426dc2fbefa8a901778c5fbafe6fb9ac61c4a004 (patch)
tree98d26d42aecd3b69cb6b7c60beeb970e2da83394
parent8a7506c98c39bd0e94051a71b8ad304b3fd9c760 (diff)
downloadQt-426dc2fbefa8a901778c5fbafe6fb9ac61c4a004.zip
Qt-426dc2fbefa8a901778c5fbafe6fb9ac61c4a004.tar.gz
Qt-426dc2fbefa8a901778c5fbafe6fb9ac61c4a004.tar.bz2
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.
-rw-r--r--src/gui/inputmethod/qwininputcontext_win.cpp7
1 files changed, 6 insertions, 1 deletions
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);