mac: Always cancel application termination.

OS X's application termination doesn't work very well with C++ message
loops. Especially when we return NSTerminateLater for shouldTerminate,
it would be impossible for the C++ message loop to quit, because unless
we explictly let NSApp terminate the application, the message loop would
think the application is not terminated and will run forever.

The fix is to simply ignore the Cocoa's application termination request
and let the C++ message loop deal with it compeletey. But we had the
side effect that atom-shell would always cancel OS X's shutdown request,
this is also the approach chosen by Chromium.

Fixes #229.
Fixes atom/atom#1864.
This commit is contained in:
Cheng Zhao 2014-04-15 00:02:33 +08:00
parent 6f4aed83f0
commit b994ae8174
6 changed files with 2 additions and 20 deletions

View file

@ -32,8 +32,4 @@ std::string Browser::GetExecutableFileProductName() const {
return "Atom-Shell";
}
void Browser::CancelQuit() {
// No way to cancel quit on Linux.
}
} // namespace atom