From 2ee8142136c93f4edd66ff0f329566802a7821c3 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 12 Jul 2016 15:01:37 +0900 Subject: [PATCH 1/2] Fix transparent window having border on OS X 10.9 --- atom/browser/native_window_mac.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 7d627208a5a3..14ac3e73142b 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -1082,7 +1082,10 @@ void NativeWindowMac::UpdateDraggableRegions( void NativeWindowMac::InstallView() { // Make sure the bottom corner is rounded: http://crbug.com/396264. - [[window_ contentView] setWantsLayer:YES]; + // But do not enable it on OS X 10.9 for transparent window, otherwise a + // semi-transparent frame would show. + if (!(transparent() && base::mac::IsOSMavericks())) + [[window_ contentView] setWantsLayer:YES]; NSView* view = inspectable_web_contents()->GetView()->GetNativeView(); if (has_frame()) { From 3335792200b7b7f7b88d997416e73e3f9e11e258 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 12 Jul 2016 15:15:47 +0900 Subject: [PATCH 2/2] Remove some unneeded hacks for old OS X versions --- atom/browser/native_window_mac.mm | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 14ac3e73142b..743e308d594a 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -241,13 +241,6 @@ bool ScopedDisableResize::disable_resize_ = false; } - (void)windowDidExitFullScreen:(NSNotification*)notification { - // For certain versions of macOS the fullscreen button will automatically show - // after exiting fullscreen mode. - if (!shell_->has_frame()) { - NSWindow* window = shell_->GetNativeWindow(); - [[window standardWindowButton:NSWindowFullScreenButton] setHidden:YES]; - } - shell_->NotifyWindowLeaveFullScreen(); } @@ -724,11 +717,6 @@ void NativeWindowMac::SetFullScreen(bool fullscreen) { if (fullscreen == IsFullscreen()) return; - if (!base::mac::IsOSLionOrLater()) { - LOG(ERROR) << "Fullscreen mode is only supported above Lion"; - return; - } - [window_ toggleFullScreen:nil]; }