From 24f8c5195986ef991ba949bec4b2da9deaf3ef23 Mon Sep 17 00:00:00 2001 From: Frank Hale Date: Fri, 7 Nov 2014 13:34:52 -0500 Subject: [PATCH] Make sure frame is frameless --- atom/browser/native_window_views.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index af069191..35c0f1c6 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -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()); -- 2.43.0