From 5f357d39b23a4fb06bfa081d5c75d84e99a43b14 Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 6 May 2015 10:08:24 -0400 Subject: [PATCH] If it's frameless then use the textured background. --- atom/browser/native_window_mac.mm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index c58c1d6..4dac6b7 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -310,10 +310,18 @@ NativeWindowMac::NativeWindowMac(content::WebContents* web_contents, width, height); + bool useFrame = true; + options.Get(switches::kFrame, &useFrame); + + NSUInteger styleMask = NSTitledWindowMask | NSClosableWindowMask | + NSMiniaturizableWindowMask | NSResizableWindowMask; + if (!useFrame) { + styleMask |= NSTexturedBackgroundWindowMask; + } + window_.reset([[AtomNSWindow alloc] initWithContentRect:cocoa_bounds - styleMask:NSTitledWindowMask | NSClosableWindowMask | - NSMiniaturizableWindowMask | NSResizableWindowMask + styleMask:styleMask backing:NSBackingStoreBuffered defer:YES]); [window_ setShell:this]; -- 2.7.4