]> khamidou — GitHub mirrors - electron.git/commitdiff
Make sure frame is frameless
authorFrank Hale <frankhale@gmail.com>
Fri, 7 Nov 2014 18:34:52 +0000 (13:34 -0500)
committerFrank Hale <frankhale@gmail.com>
Fri, 7 Nov 2014 18:34:52 +0000 (13:34 -0500)
atom/browser/native_window_views.cc

index af069191b83d37a991b22a6a2dd58c50a4618945..35c0f1c65681e5c2a4ba6fa1b559f239bf6825ec 100644 (file)
@@ -226,13 +226,14 @@ NativeWindowViews::NativeWindowViews(content::WebContents* web_contents,
       options.Get(switches::kUseContentSize, &use_content_size_) &&
       use_content_size_)
     bounds = ContentBoundsToWindowBounds(bounds);
-  #if defined(OS_WIN)
-  else {
+
+#if defined(OS_WIN)
+  if (!has_frame_) {
     // set Window style so that we get a minimize and maximize animation when frameless
     DWORD frame_style = WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CAPTION;
     ::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style);
   }
-  #endif
+#endif
 
   window_->UpdateWindowIcon();
   window_->CenterWindow(bounds.size());