summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-05-23 16:35:58 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-23 17:47:54 +0200
commit47a7628023610904c6ac52e23fa289f75f349b4e (patch)
treec4db9f4859c8ee8690bd274604040ddd27abab11 /src/plugins/platforms/cocoa
parent964be004033ea84dd4b8cbef53c4660b714dde09 (diff)
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 <gunnar.sletta@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-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());