Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2274)

Unified Diff: ash/common/wm/default_state.cc

Issue 2589793002: ash: Should use GetTargetBounds to check call of SetBoundsDirectAnimated (Closed)
Patch Set: nits Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/default_state.cc
diff --git a/ash/common/wm/default_state.cc b/ash/common/wm/default_state.cc
index d7e49d9579bb57bb16e98241e359238de9cefeaf..d17253e6a9187f68018c7fd5e483d8015509fa50 100644
--- a/ash/common/wm/default_state.cc
+++ b/ash/common/wm/default_state.cc
@@ -451,12 +451,12 @@ bool DefaultState::ProcessWorkspaceEvents(WindowState* window_state,
}
gfx::Rect work_area_in_parent =
GetDisplayWorkAreaBoundsInParent(window_state->window());
- gfx::Rect bounds = window_state->window()->GetBounds();
+ gfx::Rect bounds = window_state->window()->GetTargetBounds();
// When display bounds has changed, make sure the entire window is fully
// visible.
bounds.AdjustToFit(work_area_in_parent);
window_state->AdjustSnappedBounds(&bounds);
- if (window_state->window()->GetBounds() != bounds)
+ if (window_state->window()->GetTargetBounds() != bounds)
window_state->SetBoundsDirectAnimated(bounds);
return true;
}
@@ -476,11 +476,11 @@ bool DefaultState::ProcessWorkspaceEvents(WindowState* window_state,
}
gfx::Rect work_area_in_parent =
GetDisplayWorkAreaBoundsInParent(window_state->window());
- gfx::Rect bounds = window_state->window()->GetBounds();
+ gfx::Rect bounds = window_state->window()->GetTargetBounds();
wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area_in_parent,
&bounds);
window_state->AdjustSnappedBounds(&bounds);
- if (window_state->window()->GetBounds() != bounds)
+ if (window_state->window()->GetTargetBounds() != bounds)
window_state->SetBoundsDirectAnimated(bounds);
return true;
}
« no previous file with comments | « no previous file | ash/common/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698