summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-08-18 14:36:09 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-08-19 16:31:13 (GMT)
commita957ed92a61d9311ed163dba15f2b6f8d30bf03c (patch)
treec7725e43504249a5849773a997cc905fa368e83c
parente82b5535c170c82d3ba7369eb1957f8d264300e2 (diff)
downloadQt-a957ed92a61d9311ed163dba15f2b6f8d30bf03c.zip
Qt-a957ed92a61d9311ed163dba15f2b6f8d30bf03c.tar.gz
Qt-a957ed92a61d9311ed163dba15f2b6f8d30bf03c.tar.bz2
Ensure geometry of top-level widget accounts for S60 screen furniture
If the S60 screen furniture has already been constructed before QWidgetPrivate::show_sys() is called on a top-level widget which has Qt::WindowMaximized set (e.g. due to a showMaximized() call), its geometry is set to the full screen extent, including the regions covered by the status bar and CBA. This patch ensures that calculation of the widget geometry always takes into account the screen furniture. Task-number: QTBUG-12605 Reviewed-by: Jason Barron
-rw-r--r--src/gui/kernel/qwidget_s60.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 319f330..7ab9fbc 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -482,14 +482,13 @@ void QWidgetPrivate::show_sys()
activateSymbianWindow();
QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId());
+ const bool isFullscreen = q->windowState() & Qt::WindowFullScreen;
#ifdef Q_WS_S60
// Lazily initialize the S60 screen furniture when the first window is shown.
if (!QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)
&& !S60->buttonGroupContainer() && !S60->statusPane()) {
- bool isFullscreen = q->windowState() & Qt::WindowFullScreen;
-
if (!q->testAttribute(Qt::WA_DontShowOnScreen)) {
// Create the status pane and CBA here
@@ -504,23 +503,24 @@ void QWidgetPrivate::show_sys()
// Can't use AppUi directly because it privately inherits from MEikStatusPaneObserver.
QSymbianControl *desktopControl = static_cast<QSymbianControl *>(QApplication::desktop()->winId());
S60->statusPane()->SetObserver(desktopControl);
-
- // Hide the status pane if fullscreen OR
- // Fill client area if maximized OR
- // Put window below status pane unless the window has an explicit position.
- if (isFullscreen) {
+ if (isFullscreen)
S60->statusPane()->MakeVisible(false);
- } else if (q->windowState() & Qt::WindowMaximized) {
- TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
- id->SetExtent(r.iTl, r.Size());
- } else if (!q->testAttribute(Qt::WA_Moved)) {
- id->SetPosition(static_cast<CEikAppUi*>(S60->appUi())->ClientRect().iTl);
- }
}
}
}
#endif
+ // Fill client area if maximized OR
+ // Put window below status pane unless the window has an explicit position.
+ if (!isFullscreen) {
+ if (q->windowState() & Qt::WindowMaximized) {
+ TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
+ id->SetExtent(r.iTl, r.Size());
+ } else if (!q->testAttribute(Qt::WA_Moved)) {
+ id->SetPosition(static_cast<CEikAppUi*>(S60->appUi())->ClientRect().iTl);
+ }
+ }
+
id->MakeVisible(true);
if(q->isWindow())