summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2011-06-13 11:57:54 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2011-06-14 07:17:10 (GMT)
commit56cd5a428e47a49f56fbacbf7250299559d6f195 (patch)
treeb64d270bb35f038ca050fc136a5edc071d727b30 /src/gui/kernel
parent3199ee59ad931b88a26657fc5c66d94c4fff606f (diff)
downloadQt-56cd5a428e47a49f56fbacbf7250299559d6f195.zip
Qt-56cd5a428e47a49f56fbacbf7250299559d6f195.tar.gz
Qt-56cd5a428e47a49f56fbacbf7250299559d6f195.tar.bz2
Fix screen dimensions after orientation change in split screen mode.
The client area dimensions reported by native side only encompass the screen not covered by virtual keyboard and ignore the status pane. Fixed by recalculating proper client area in handleClientAreaChange() using layout metrics. Task-number: QT-5105 Reviewed-by: Sami Merila
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index b5db3d0..bf76a0e 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1427,6 +1427,24 @@ void QSymbianControl::handleClientAreaChange()
SetExtentToWholeScreen();
} else if (qwidget->isMaximized() || (qwidget->isFullScreen() && cbaVisibilityHint)) {
TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
+ if (!S60->splitViewLastWidget && S60->partialKeyboardOpen) {
+ // For some curious reason, native side indicates that splitviewRect starts
+ // underneath statuspane. So, if statuspane is visible, move the splitview
+ // down a little bit. Note that if there is S60->splitViewLastWidget, it means
+ // the resizing is done by input context handling and this metrics calculation
+ // is not needed.
+ TRect statusPaneRect;
+ TRect mainRect;
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane, statusPaneRect);
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainRect);
+ int clientAreaHeight = mainRect.Height();
+ CEikStatusPane *const s = S60->statusPane();
+ if (s && s->IsVisible())
+ r.Move(0, statusPaneRect.Height());
+ else
+ clientAreaHeight += statusPaneRect.Height();
+ r.SetHeight(clientAreaHeight);
+ }
SetExtent(r.iTl, r.Size());
} else if (!qwidget->isMinimized()) { // Normal geometry
if (!qwidget->testAttribute(Qt::WA_Resized)) {