Initialize level_ in initWithShell
This commit is contained in:
parent
12b90a2304
commit
4935e8567f
2 changed files with 3 additions and 3 deletions
|
@ -86,6 +86,7 @@ bool ScopedDisableResize::disable_resize_ = false;
|
||||||
if ((self = [super init])) {
|
if ((self = [super init])) {
|
||||||
shell_ = shell;
|
shell_ = shell;
|
||||||
is_zooming_ = false;
|
is_zooming_ = false;
|
||||||
|
level_ = [shell_->GetNativeWindow() level];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -217,8 +218,7 @@ bool ScopedDisableResize::disable_resize_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)windowDidDeminiaturize:(NSNotification*)notification {
|
- (void)windowDidDeminiaturize:(NSNotification*)notification {
|
||||||
NSWindow* window = shell_->GetNativeWindow();
|
[shell_->GetNativeWindow() setLevel:level_];
|
||||||
[window setLevel:level_];
|
|
||||||
shell_->NotifyWindowRestore();
|
shell_->NotifyWindowRestore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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') {
|
if (process.platform !== 'darwin') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue