diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 45123d24871d..3735772fe1df 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -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();