From: Cheng Zhao Date: Wed, 24 Dec 2014 01:24:04 +0000 (-0800) Subject: win: Make transparent window resizable X-Git-Tag: v0.20.6~5^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6939567cb4297ef2c4202a7002a05effb893360e;p=electron.git win: Make transparent window resizable --- diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 2700fe57..9178b43e 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -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); }