Fix showFullScreen for QWindow
authorAndreas Holzammer <andreas.holzammer@kdab.com>
Tue, 31 Jul 2012 14:12:18 +0000 (16:12 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 31 Jul 2012 18:26:31 +0000 (20:26 +0200)
If the setWindowState is called in a early stage,
where the window is not yet shown, the fullscreen
flag is cached in the QWindow. Then in the call to
setVisible(true) the window gets generated, but the
fullscreen is not handled there. So set the state
while window is generated.

Change-Id: I0ea53ed8a2465da6a9973d84fb4579381543e89b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/plugins/platforms/windows/qwindowswindow.cpp

index cdf1c2b..4b1b129 100644 (file)
@@ -693,7 +693,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
     m_data(data),
     m_flags(0),
     m_hdc(0),
-    m_windowState(aWindow->windowState()),
+    m_windowState(Qt::WindowNoState),
     m_opacity(1.0),
     m_mouseGrab(false),
     m_cursor(QWindowsScreen::screenOf(aWindow)->windowsCursor()->standardWindowCursor()),
@@ -721,6 +721,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
             break;
         }
     }
+    setWindowState(aWindow->windowState());
 }
 
 QWindowsWindow::~QWindowsWindow()