If it's frameless then use the textured background.
authorjoshaber <joshaber@gmail.com>
Wed, 6 May 2015 14:08:24 +0000 (10:08 -0400)
committerjoshaber <joshaber@gmail.com>
Wed, 6 May 2015 14:08:24 +0000 (10:08 -0400)
atom/browser/native_window_mac.mm

index c58c1d6..4dac6b7 100644 (file)
@@ -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];