From b6cab6070fc5e89607fc0f55326f0742cc31e839 Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Tue, 27 Mar 2012 15:49:17 +0400 Subject: [PATCH] 7149085: [macosx] Quit with QuitStrategy CLOSE_ALL_WINDOWS does terminate application Don't force the termination of the event loop in the Quit action handler Reviewed-by: art --- jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java b/jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java index e94b66daf2b..a380e8412fd 100644 --- a/jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java +++ b/jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java @@ -157,7 +157,10 @@ class _AppEventHandler { } }); } 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); } }