summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-10-08 12:25:04 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-10-08 13:20:35 (GMT)
commit0fcee2f495eb2e1c4b76aa8c3e5462595aed0ab3 (patch)
tree708ec88d4b3d44c56da5e3a6a5c4587fa0d7aae8 /src
parent4ee912a752a4b7f129e98e180328f1f46f053d4f (diff)
downloadQt-0fcee2f495eb2e1c4b76aa8c3e5462595aed0ab3.zip
Qt-0fcee2f495eb2e1c4b76aa8c3e5462595aed0ab3.tar.gz
Qt-0fcee2f495eb2e1c4b76aa8c3e5462595aed0ab3.tar.bz2
Account for native child widgets when handling focus events
The code previously contained an implicit assumption that the control which received the FocusChanged event was a top-level widget. This meant that focus events delivered to native child widgets could cause unexpected changes in visibility of the statusbar and CBA. Task-number: QTBUG-13761 Reviewed-by: Jason Barron
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 296f24f..5ff2fd4 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1237,10 +1237,11 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
// If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- const bool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ QWidget *const window = qwidget->window();
+ const bool visible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
const bool statusPaneVisibility = visible;
- const bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
- const bool cbaVisibilityHint = qwidget->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ const bool isFullscreen = window->windowState() & Qt::WindowFullScreen;
+ const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint;
const bool buttonGroupVisibility = (visible || (isFullscreen && cbaVisibilityHint));
S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif