Skip to content

Commit

Permalink
If it's frameless then use the textured background.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed May 6, 2015
1 parent 102fb66 commit 5f357d3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions atom/browser/native_window_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,18 @@ - (void)drawRect:(NSRect)dirtyRect {
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];
Expand Down

0 comments on commit 5f357d3

Please sign in to comment.