mac: Use transparent window

This commit is contained in:
Cheng Zhao 2014-12-23 11:17:56 -08:00
parent 4fc73117c4
commit 45c41fe880

View file

@ -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];