From: Cheng Zhao Date: Tue, 23 Dec 2014 19:17:56 +0000 (-0800) Subject: mac: Use transparent window X-Git-Tag: v0.20.6~5^2~8 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=45c41fe8806a74fbf268395e174a0af20f31f1c6;p=electron.git mac: Use transparent window --- diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index c57ceee9..304e1f7f 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -314,6 +314,13 @@ NativeWindowMac::NativeWindowMac(content::WebContents* web_contents, [[AtomNSWindowDelegate alloc] initWithShell:this]; [window_ setDelegate:delegate]; + if (transparent_) { + // Make window has transparent background. + [window_ setOpaque:NO]; + [window_ setHasShadow:NO]; + [window_ setBackgroundColor:[NSColor clearColor]]; + } + // We will manage window's lifetime ourselves. [window_ setReleasedWhenClosed:NO];