]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Make transparent window resizable
authorCheng Zhao <zcbenz@gmail.com>
Wed, 24 Dec 2014 01:24:04 +0000 (17:24 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 24 Dec 2014 01:24:04 +0000 (17:24 -0800)
atom/browser/native_window_views.cc

index 2700fe574b0531e1bc882d914c680e9bda8d8208..9178b43eac64ba5f8ed5bd0adbe84af2065d4d53 100644 (file)
@@ -236,11 +236,14 @@ NativeWindowViews::NativeWindowViews(content::WebContents* web_contents,
     bounds = ContentBoundsToWindowBounds(bounds);
 
 #if defined(OS_WIN)
-  if (!transparent_ && !has_frame_) {
+  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;
+    // We should not show a frame for transparent window.
+    if (transparent_)
+      frame_style &= ~(WS_THICKFRAME | WS_CAPTION);
     ::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style);
   }