Sync QWindow properties on NSWindow creation.
authorMorten Johan Sorvig <morten.sorvig@nokia.com>
Fri, 18 May 2012 05:55:53 +0000 (07:55 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 5 Jul 2012 09:06:33 +0000 (11:06 +0200)
Synchronize size hints, window title, flags and state.

Change-Id: Ibc2358d8d4d0625aaddfbcad159e3682e3e79d3c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
src/plugins/platforms/cocoa/qcocoawindow.mm

index f29a9be..eb3dea3 100644 (file)
@@ -408,6 +408,12 @@ void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow)
         m_nsWindow = createNSWindow();
         setNSWindow(m_nsWindow);
 
+        // QPlatformWindow subclasses must sync up with QWindow on creation:
+        propagateSizeHints();
+        setWindowFlags(window()->windowFlags());
+        setWindowTitle(window()->windowTitle());
+        setWindowState(window()->windowState());
+
         if (window()->transientParent()) {
             // keep this window on the same level as its transient parent (which may be a modal dialog, for example)
             QCocoaWindow *parentCocoaWindow = static_cast<QCocoaWindow *>(window()->transientParent()->handle());