src/macosx/classes/com/apple/eawt/_AppEventHandler.java
Print this page
@@ -155,11 +155,14 @@
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
}
}
});
} 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);
}
}
/*
* callbacks from native delegate