mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Ensure closing the application will call window.shutdown on each window.
This commit is contained in:
@@ -171,10 +171,8 @@
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)notification {
|
||||
NSInteger windowCount = [[self windows] count];
|
||||
for(int i = 0; i < windowCount; i++) {
|
||||
NSWindow *window = [[self windows] objectAtIndex:i];
|
||||
[window performClose:0];
|
||||
for (NSWindow *window in [self windows]) {
|
||||
[window performClose:self];
|
||||
}
|
||||
CefShutdown();
|
||||
}
|
||||
|
||||
@@ -164,11 +164,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowWillClose:(NSNotification *)notification {
|
||||
- (BOOL)windowShouldClose:(NSNotification *)notification {
|
||||
if (_cefClient && _cefClient->GetBrowser()) {
|
||||
_cefClient->GetBrowser()->SendProcessMessage(PID_RENDERER, CefProcessMessage::Create("shutdown"));
|
||||
}
|
||||
[self autorelease];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)populateBrowserSettings:(CefBrowserSettings &)settings {
|
||||
|
||||
Reference in New Issue
Block a user