Fix styling issues

This commit is contained in:
Cheng Zhao 2016-08-01 09:58:33 +09:00
parent fb76aaac39
commit 01ebc77228
2 changed files with 5 additions and 6 deletions

View file

@ -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_;

View file

@ -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;