Initialize level_ in initWithShell

This commit is contained in:
Kevin Sawicki 2017-07-14 10:07:06 -07:00
parent 12b90a2304
commit 4935e8567f
2 changed files with 3 additions and 3 deletions

View file

@ -86,6 +86,7 @@ bool ScopedDisableResize::disable_resize_ = false;
if ((self = [super init])) {
shell_ = shell;
is_zooming_ = false;
level_ = [shell_->GetNativeWindow() level];
}
return self;
}
@ -217,8 +218,7 @@ bool ScopedDisableResize::disable_resize_ = false;
}
- (void)windowDidDeminiaturize:(NSNotification*)notification {
NSWindow* window = shell_->GetNativeWindow();
[window setLevel:level_];
[shell_->GetNativeWindow() setLevel:level_];
shell_->NotifyWindowRestore();
}

View file

@ -620,7 +620,7 @@ describe('BrowserWindow module', function () {
})
})
describe.only('BrowserWindow.alwaysOnTop() resets level on minimize', function () {
describe('BrowserWindow.alwaysOnTop() resets level on minimize', function () {
if (process.platform !== 'darwin') {
return
}