diff options
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 1 | ||||
-rw-r--r-- | tests/auto/opengl/qgl/tst_qgl.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 83678ddf67..94904c12f6 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -320,6 +320,7 @@ 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) { // setWindowState might have been called while the window was hidden and diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index 00973cf533..28ec699427 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -875,6 +875,10 @@ void tst_QGL::graphicsViewClipping() scene.setSceneRect(view.viewport()->rect()); QVERIFY(QTest::qWaitForWindowExposed(&view)); + #ifdef Q_OS_MAC + // The black rectangle jumps from the center to the upper left for some reason. + QTest::qWait(100); + #endif QTRY_VERIFY(widget->painted); |