diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 2b73fb8c100c..fb1e99566b6e 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -6,18 +6,18 @@ #include +#import "atom/browser/ui/cocoa/event_processing_window.h" +#include "atom/common/draggable_region.h" +#include "atom/common/options_switches.h" #include "base/mac/mac_util.h" #include "base/strings/sys_string_conversions.h" #include "base/values.h" -#import "atom/browser/ui/cocoa/event_processing_window.h" -#include "brightray/browser/inspectable_web_contents.h" -#include "brightray/browser/inspectable_web_contents_view.h" -#include "atom/common/draggable_region.h" -#include "atom/common/options_switches.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_view.h" #include "content/public/browser/render_view_host.h" +#include "vendor/brightray/browser/inspectable_web_contents.h" +#include "vendor/brightray/browser/inspectable_web_contents_view.h" static const CGFloat kAtomWindowCornerRadius = 4.0; @@ -179,6 +179,12 @@ NativeWindowMac::NativeWindowMac(content::WebContents* web_contents, // We will manage window's lifetime ourselves. [window_ setReleasedWhenClosed:NO]; + // On OS X the initial window size doesn't include window frame. + bool use_content_size = false; + options->GetBoolean(switches::kUseContentSize, &use_content_size); + if (has_frame_ && !use_content_size) + SetSize(gfx::Size(width, height)); + // Enable the NSView to accept first mouse event. bool acceptsFirstMouse = false; options->GetBoolean(switches::kAcceptFirstMouse, &acceptsFirstMouse);