From 56cd5a428e47a49f56fbacbf7250299559d6f195 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 13 Jun 2011 14:57:54 +0300 Subject: 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 --- src/gui/kernel/qapplication_s60.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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(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)) { -- cgit v0.12