From 669588484fe4ee4ab1fddf39887d684d563b7450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 18 Mar 2014 11:30:05 +0100 Subject: Cocoa: Close windows with QWSI::handleCloseEvent() Calling QWindow::close() directly bypasses some of the window close logic in the QWindow subclasses. Change-Id: I208db5600e6a756e25e207eaaf55dcfad255f406 Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index 327ca00ad6..f8411845dc 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -223,8 +223,9 @@ static void cleanupCocoaApplicationDelegate() // events while the event loop is still running. const QWindowList topLevels = QGuiApplication::topLevelWindows(); for (int i = 0; i < topLevels.size(); ++i) { - topLevels.at(i)->close(); + QWindowSystemInterface::handleCloseEvent(topLevels.at(i)); } + QWindowSystemInterface::flushWindowSystemEvents(); QGuiApplication::exit(0); startedQuit = false; -- cgit v1.2.3