7149085: [macosx] Quit with QuitStrategy CLOSE_ALL_WINDOWS does terminate application
Summary: Don't force the termination of the event loop in the Quit action handler
Reviewed-by: art
--- a/jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java Tue Mar 27 15:41:55 2012 +0400
+++ b/jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java Tue Mar 27 15:49:17 2012 +0400
@@ -157,7 +157,10 @@
}
});
} finally {
- nativeReplyToAppShouldTerminate(true);
+ // Either we've just called System.exit(), or the app will call
+ // it when processing a WINDOW_CLOSING event. Either way, we reply
+ // to Cocoa that we don't want to exit the event loop yet.
+ nativeReplyToAppShouldTerminate(false);
}
}