diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index ba91651a029f6..9d44a67638974 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -23,6 +23,7 @@ #include "native_mate/dictionary.h" #include "skia/ext/skia_utils_mac.h" #include "ui/gfx/skia_util.h" +#include "ui/gl/gpu_switching_manager.h" namespace { @@ -1634,15 +1635,19 @@ static bool FromV8(v8::Isolate* isolate, v8::Handle val, [vibrant_view removeFromSuperview]; [window_ setVibrantView:nil]; + ui::GpuSwitchingManager::SetTransparent(transparent()); return; } background_color_before_vibrancy_.reset([window_ backgroundColor]); transparency_before_vibrancy_ = [window_ titlebarAppearsTransparent]; + ui::GpuSwitchingManager::SetTransparent(true); - [window_ setTitlebarAppearsTransparent:YES]; - [window_ setBackgroundColor:[NSColor clearColor]]; + if (title_bar_style_ != NORMAL) { + [window_ setTitlebarAppearsTransparent:YES]; + [window_ setBackgroundColor:[NSColor clearColor]]; + } NSVisualEffectView* effect_view = (NSVisualEffectView*)vibrant_view; if (effect_view == nil) { diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 378fe78bae0be..5fff4ab1bd02a 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -235,7 +235,9 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. window shadow and window animations. Default is `true`. * `vibrancy` String (optional) - Add a type of vibrancy effect to the window, only on macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`, - `menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`. + `menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`. Please note that + using `frame: false` in combination with a vibrancy value requires that you use a + non-default `titleBarStyle` as well. * `zoomToPageWidth` Boolean (optional) - Controls the behavior on macOS when option-clicking the green stoplight button on the toolbar or by clicking the Window > Zoom menu item. If `true`, the window will grow to the preferred