changeset 5185:4008c98ad48a

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
author anthony
date Tue, 27 Mar 2012 15:49:17 +0400
parents 9923c60c26b7
children 3d5e83373a39
files src/macosx/classes/com/apple/eawt/_AppEventHandler.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/com/apple/eawt/_AppEventHandler.java	Tue Mar 27 15:41:55 2012 +0400
+++ b/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);
         }
     }