Merge pull request #3588 from atom/fix-fullscreen-crash
Clears the delegate when window is going to be closed
This commit is contained in:
commit
086734cb57
2 changed files with 6 additions and 1 deletions
|
@ -54,7 +54,7 @@ deprecate.event app, 'finish-launching', 'ready', ->
|
||||||
setImmediate => # give default app a chance to setup default menu.
|
setImmediate => # give default app a chance to setup default menu.
|
||||||
@emit 'finish-launching'
|
@emit 'finish-launching'
|
||||||
deprecate.event app, 'activate-with-no-open-windows', 'activate', (event, hasVisibleWindows) ->
|
deprecate.event app, 'activate-with-no-open-windows', 'activate', (event, hasVisibleWindows) ->
|
||||||
@emit 'activate-with-no-open-windows' if not hasVisibleWindows
|
@emit 'activate-with-no-open-windows', event if not hasVisibleWindows
|
||||||
deprecate.event app, 'select-certificate', 'select-client-certificate'
|
deprecate.event app, 'select-certificate', 'select-client-certificate'
|
||||||
|
|
||||||
# Wrappers for native classes.
|
# Wrappers for native classes.
|
||||||
|
|
|
@ -192,6 +192,11 @@ bool ScopedDisableResize::disable_resize_ = false;
|
||||||
|
|
||||||
- (void)windowWillClose:(NSNotification*)notification {
|
- (void)windowWillClose:(NSNotification*)notification {
|
||||||
shell_->NotifyWindowClosed();
|
shell_->NotifyWindowClosed();
|
||||||
|
|
||||||
|
// Clears the delegate when window is going to be closed, since EL Capitan it
|
||||||
|
// is possible that the methods of delegate would get called after the window
|
||||||
|
// has been closed.
|
||||||
|
[shell_->GetNativeWindow() setDelegate:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)windowShouldClose:(id)window {
|
- (BOOL)windowShouldClose:(id)window {
|
||||||
|
|
Loading…
Reference in a new issue