diff options
author | axis <qt-info@nokia.com> | 2009-04-17 11:58:37 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-05-04 13:24:34 (GMT) |
commit | 82840fcce074658bd39ad6425fd50022b9250dcf (patch) | |
tree | fe184623e20c5711dbb03cab8de357a72fc85ea0 /src | |
parent | 23972064c554163e4bdb6de0fe6eaa0d41a6ad6a (diff) | |
download | Qt-82840fcce074658bd39ad6425fd50022b9250dcf.zip Qt-82840fcce074658bd39ad6425fd50022b9250dcf.tar.gz Qt-82840fcce074658bd39ad6425fd50022b9250dcf.tar.bz2 |
Close the input panel when focusing a non-inputmethods aware widget.
AutoTest: Included
RevBy: denis
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 28e152a..c8fedfc 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2098,6 +2098,16 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason) prev->setEditFocus(false); } #endif +#ifndef QT_NO_IM + if (focus) { + QInputContext *prevIc; + prevIc = prev->inputContext(); + if (prevIc && prevIc != focus->inputContext()) { + QEvent closeSIPEvent(QEvent::CloseSoftwareInputPanel); + QApplication::sendEvent(prev, &closeSIPEvent); + } + } +#endif QFocusEvent out(QEvent::FocusOut, reason); QPointer<QWidget> that = prev; QApplication::sendEvent(prev, &out); |