Do not hide fullscreen widgets having a 0x0 geometry
authorOliver Wolff <oliver.wolff@digia.com>
Thu, 22 Nov 2012 08:44:33 +0000 (09:44 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 22 Nov 2012 13:14:37 +0000 (14:14 +0100)
It is possible that the widget which is to be shown full screen has a
0x0 geometry if an empty layout with 0 margin is set there. In that case
the widget should not be hidden.

Task-number: QTBUG-27602

Change-Id: I87fd20cc3a5bac89ceccdf639780c4bc721ce860
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
src/widgets/kernel/qwidget_qpa.cpp

index b4d9b9d..aec5fcf 100644 (file)
@@ -710,7 +710,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
 
     bool needsShow = false;
 
-    if (w == 0 || h == 0) {
+    if (!(data.window_state & Qt::WindowFullScreen) && (w == 0 || h == 0)) {
         q->setAttribute(Qt::WA_OutsideWSRange, true);
         if (q->isVisible() && q->testAttribute(Qt::WA_Mapped))
             hide_sys();