From a69ee76705fe2b0e036dcced62b8b84432a3bb2e Mon Sep 17 00:00:00 2001 From: liusi Date: Tue, 8 Nov 2016 15:36:37 +0800 Subject: [PATCH] fix review comments --- 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 c41d8bb946..7475fdefc0 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -571,8 +571,9 @@ void NativeWindowViews::SetContentSizeConstraints( void NativeWindowViews::SetResizable(bool resizable) { #if defined(OS_WIN) - FlipWindowStyle(GetAcceleratedWidget(), resizable, WS_THICKFRAME); - thick_frame_ = resizable; + if(has_frame()) { + FlipWindowStyle(GetAcceleratedWidget(), resizable, WS_THICKFRAME); + } #elif defined(USE_X11) if (resizable != resizable_) { // On Linux there is no "resizable" property of a window, we have to set @@ -594,7 +595,7 @@ void NativeWindowViews::SetResizable(bool resizable) { bool NativeWindowViews::IsResizable() { #if defined(OS_WIN) - if (thick_frame_) { + if (has_frame()) { return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_THICKFRAME; } else { return CanResize();