Sync QWindow properties on NSWindow creation.

Synchronize size hints, window title, flags and state.

Change-Id: Ibc2358d8d4d0625aaddfbcad159e3682e3e79d3c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
Morten Johan Sorvig 2012-05-18 07:55:53 +02:00 committed by Qt by Nokia
parent 0915f189e2
commit a0e617f669

View 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());