diff options
author | axis <qt-info@nokia.com> | 2010-09-01 13:11:19 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-09-01 13:11:19 (GMT) |
commit | 331522fdcbf14d757b61ed79dcc11649f62f28c8 (patch) | |
tree | 57653fdd33e55e5093cc88ec8ff67e3fdfafc913 /src/gui/kernel | |
parent | dd1a7c2186348157c4a255f56f280006c8d8c17d (diff) | |
parent | 5ca6264933af60b3cd376b7f08bea008fa69b515 (diff) | |
download | Qt-331522fdcbf14d757b61ed79dcc11649f62f28c8.zip Qt-331522fdcbf14d757b61ed79dcc11649f62f28c8.tar.gz Qt-331522fdcbf14d757b61ed79dcc11649f62f28c8.tar.bz2 |
Merge branch 'variousFixes' into 4.7-s60
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 29 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 4 |
2 files changed, 22 insertions, 11 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index e197dc5..4ed4ba3 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1242,17 +1242,28 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility); #endif } else if (QApplication::activeWindow() == qwidget->window()) { - if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) { - QWidget *fw = QApplication::focusWidget(); - if (fw) { - QFocusEvent event(QEvent::FocusOut, Qt::PopupFocusReason); - QCoreApplication::sendEvent(fw, &event); - } - m_symbianPopupIsOpen = true; - return; + bool focusedControlFound = false; + WId winId = 0; + for (QWidget *w = qwidget->parentWidget(); w && (winId = w->internalWinId()); w = w->parentWidget()) { + if (winId->IsFocused() && winId->IsVisible()) { + focusedControlFound = true; + break; + } else if (w->isWindow()) + break; } + if (!focusedControlFound) { + if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) { + QWidget *fw = QApplication::focusWidget(); + if (fw) { + QFocusEvent event(QEvent::FocusOut, Qt::PopupFocusReason); + QCoreApplication::sendEvent(fw, &event); + } + m_symbianPopupIsOpen = true; + return; + } - QApplication::setActiveWindow(0); + QApplication::setActiveWindow(0); + } } // else { We don't touch the active window unless we were explicitly activated or deactivated } } diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index eb1aa18..7fd2baa 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -87,7 +87,7 @@ const TInt KInternalStatusPaneChange = 0x50000000; //this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2 #define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13) -class QS60ThreadLocalData +class Q_AUTOTEST_EXPORT QS60ThreadLocalData { public: QS60ThreadLocalData(); @@ -171,7 +171,7 @@ public: #endif }; -QS60Data* qGlobalS60Data(); +Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data(); #define S60 qGlobalS60Data() class QAbstractLongTapObserver |