From 713910ac67da8ba4b96fc6fb0e350676fbd730d3 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Tue, 20 Apr 2010 09:35:27 +0200 Subject: Don't use setGeometry() in setWindowState() on Symbian. setGeometry() has the side effect that it internally sets both the WA_Moved and WA_Resized attributes and these attributes should only be used when the application has explicitly set a size or position. When a widget is resized due to being maximized or fullscreened then we should resize the native window handle instead of calling setGeometry. Reviewed-by: Janne Anttila --- src/gui/kernel/qwidget_s60.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 690fb8d..b6a6359 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1112,12 +1112,14 @@ void QWidget::setWindowState(Qt::WindowStates newstate) const bool cbaVisibilityHint = windowFlags() & Qt::WindowSoftkeysVisibleHint; - if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) - setGeometry(qApp->desktop()->screenGeometry(this)); - else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) - setGeometry(qApp->desktop()->availableGeometry(this)); - else + if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) { + window->SetExtentToWholeScreen(); + } else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) { + TRect maxExtent = qt_QRect2TRect(qApp->desktop()->availableGeometry(this)); + window->SetExtent(maxExtent.iTl, maxExtent.Size()); + } else { setGeometry(normalGeometry); + } //restore normal geometry top->normalGeometry = normalGeometry; -- cgit v0.12