Merge pull request #4016 from atom/el-capitan-fullscreen
Fix hiding fullscreen button on EL Capitan
This commit is contained in:
commit
24779a8589
1 changed files with 6 additions and 1 deletions
|
@ -469,12 +469,17 @@ NativeWindowMac::NativeWindowMac(
|
||||||
[window_ setDisableAutoHideCursor:disableAutoHideCursor];
|
[window_ setDisableAutoHideCursor:disableAutoHideCursor];
|
||||||
|
|
||||||
// Disable fullscreen button when 'fullscreen' is specified to false.
|
// Disable fullscreen button when 'fullscreen' is specified to false.
|
||||||
bool fullscreen;
|
bool fullscreen = false;
|
||||||
if (!(options.Get(options::kFullscreen, &fullscreen) &&
|
if (!(options.Get(options::kFullscreen, &fullscreen) &&
|
||||||
!fullscreen)) {
|
!fullscreen)) {
|
||||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||||
collectionBehavior |= NSWindowCollectionBehaviorFullScreenPrimary;
|
collectionBehavior |= NSWindowCollectionBehaviorFullScreenPrimary;
|
||||||
[window_ setCollectionBehavior:collectionBehavior];
|
[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();
|
NSView* view = inspectable_web_contents()->GetView()->GetNativeView();
|
||||||
|
|
Loading…
Reference in a new issue