diff --git a/atom/browser/native_window_views.h b/atom/browser/native_window_views.h index 85aa3a15f46f..71504ceac355 100644 --- a/atom/browser/native_window_views.h +++ b/atom/browser/native_window_views.h @@ -214,10 +214,10 @@ class NativeWindowViews : public NativeWindow, // fullscreen), so we restore it correctly. gfx::Rect last_normal_bounds_; - // last_normal_bounds_ may or may not require update on WM_MOVE. When a window - // is maximized, it is moved (WM_MOVE) to maximum size first and then sized - // (WM_SIZE). In this case, last_normal_bounds_ should not update. We keep - // last_normal_bounds_candidate_ as a candidate which will become valid + // last_normal_bounds_ may or may not require update on WM_MOVE. When a + // window is maximized, it is moved (WM_MOVE) to maximum size first and then + // sized (WM_SIZE). In this case, last_normal_bounds_ should not update. We + // keep last_normal_bounds_candidate_ as a candidate which will become valid // last_normal_bounds_ if the moves are consecutive with no WM_SIZE event in // between. gfx::Rect last_normal_bounds_candidate_; diff --git a/atom/browser/native_window_views_win.cc b/atom/browser/native_window_views_win.cc index 92697b5642bf..bb6d9858f045 100644 --- a/atom/browser/native_window_views_win.cc +++ b/atom/browser/native_window_views_win.cc @@ -110,7 +110,6 @@ bool NativeWindowViews::PreHandleMSG( if (HIWORD(w_param) == THBN_CLICKED) return taskbar_host_.HandleThumbarButtonEvent(LOWORD(w_param)); return false; - case WM_SIZE: { consecutive_moves_ = false; // Handle window state change. @@ -124,7 +123,7 @@ bool NativeWindowViews::PreHandleMSG( } case WM_MOVE: { if (last_window_state_ == ui::SHOW_STATE_NORMAL) { - if(consecutive_moves_) + if (consecutive_moves_) last_normal_bounds_ = last_normal_bounds_candidate_; last_normal_bounds_candidate_ = GetBounds(); consecutive_moves_ = true;