7149085: [macosx] Quit with QuitStrategy CLOSE_ALL_WINDOWS does terminate application
authoranthony
Tue, 27 Mar 2012 15:49:17 +0400
changeset 12281 40f247734390
parent 12280 7e17a63793ca
child 12282 b057800f17c2
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
jdk/src/macosx/classes/com/apple/eawt/_AppEventHandler.java
--- 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);
         }
     }