Merge pull request #4016 from atom/el-capitan-fullscreen
Fix hiding fullscreen button on EL Capitan
This commit is contained in:
Коммит
24779a8589
|
@ -469,12 +469,17 @@ NativeWindowMac::NativeWindowMac(
|
|||
[window_ setDisableAutoHideCursor:disableAutoHideCursor];
|
||||
|
||||
// Disable fullscreen button when 'fullscreen' is specified to false.
|
||||
bool fullscreen;
|
||||
bool fullscreen = false;
|
||||
if (!(options.Get(options::kFullscreen, &fullscreen) &&
|
||||
!fullscreen)) {
|
||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||
collectionBehavior |= NSWindowCollectionBehaviorFullScreenPrimary;
|
||||
[window_ setCollectionBehavior:collectionBehavior];
|
||||
} else if (base::mac::IsOSElCapitanOrLater()) {
|
||||
// On EL Capitan this flag is required to hide fullscreen button.
|
||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||
collectionBehavior |= NSWindowCollectionBehaviorFullScreenAuxiliary;
|
||||
[window_ setCollectionBehavior:collectionBehavior];
|
||||
}
|
||||
|
||||
NSView* view = inspectable_web_contents()->GetView()->GetNativeView();
|
||||
|
|
Загрузка…
Ссылка в новой задаче