summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm3
1 files changed, 2 insertions, 1 deletions
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());