From 47a7628023610904c6ac52e23fa289f75f349b4e Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 23 May 2013 16:35:58 +0200 Subject: Cocoa: Amend 5d07a4d9448f60 to avoid an assert in QWidget::mapTo() For now, we only call 'flushWindowSystemEvents()' for top-level QWindows. Change-Id: Ie6f6d3f9b70241820d9c38bcc0caf832d521268b Reviewed-by: Gunnar Sletta --- src/plugins/platforms/cocoa/qcocoawindow.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 94904c12f6..30c2a99fd8 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -320,9 +320,10 @@ void QCocoaWindow::setVisible(bool visible) // - QNSViews for child windows are initialy not hidden and won't get the // viewDidUnhide message. exposeWindow(); - QWindowSystemInterface::flushWindowSystemEvents(); if (m_nsWindow) { + QWindowSystemInterface::flushWindowSystemEvents(); + // setWindowState might have been called while the window was hidden and // will not change the NSWindow state in that case. Sync up here: syncWindowState(window()->windowState()); -- cgit v1.2.3