summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 37d1b62..61beb4f 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -372,8 +372,13 @@ QSymbianControl::~QSymbianControl()
{
if (S60->curWin == this)
S60->curWin = 0;
- if (!QApplicationPrivate::is_app_closing)
- setFocusSafely(false);
+ if (!QApplicationPrivate::is_app_closing) {
+ QT_TRY {
+ setFocusSafely(false);
+ } QT_CATCH(const std::exception&) {
+ // ignore exceptions, nothing can be done
+ }
+ }
S60->appUi()->RemoveFromStack(this);
delete m_longTapDetector;
}
@@ -989,7 +994,7 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
}
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
- if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog()) {
+ if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) {
QWidget *fw = QApplication::focusWidget();
if (fw) {
QFocusEvent event(QEvent::FocusOut, Qt::PopupFocusReason);
@@ -1239,6 +1244,7 @@ void qt_init(QApplicationPrivate * /* priv */, int)
}
S60->avkonComponentsSupportTransparency = false;
+ S60->menuBeingConstructed = false;
#ifdef Q_WS_S60
TUid KCRUidAvkon = { 0x101F876E };