< prev index next >
src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java
Print this page
@@ -169,11 +169,12 @@
synchronized void performQuit() {
currentQuitResponse = null;
try {
- if (defaultQuitAction == QuitStrategy.NORMAL_EXIT) System.exit(0);
+ if (defaultQuitAction == QuitStrategy.NORMAL_EXIT
+ || _AppMiscHandlers.isSuddenTerminationEnbaled()) System.exit(0);
if (defaultQuitAction != QuitStrategy.CLOSE_ALL_WINDOWS) {
throw new RuntimeException("Unknown quit action");
}
@@ -420,10 +421,14 @@
void performDefaultAction(final _NativeEvent event) {
obtainQuitResponse().performQuit();
}
void performUsing(final QuitHandler handler, final _NativeEvent event) {
+ if (_AppMiscHandlers.isSuddenTerminationEnbaled()) {
+ performDefaultAction(event);
+ return;
+ }
final MacQuitResponse response = obtainQuitResponse(); // obtains the "current" quit response
handler.handleQuitRequestWith(new QuitEvent(), response);
}
}
< prev index next >