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

Unified Diff: ash/wm/window_util.cc

Issue 1483083003: Set the window state consistently Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « ash/wm/lock_layout_manager_unittest.cc ('k') | ash/wm/window_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_util.cc
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index a0fb399314fe86188a1edd59ab76789503e4ae0e..4b61a399a00c94e2c58ecbd35cf5c24e00380f52 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -122,8 +122,10 @@ void AdjustBoundsToEnsureWindowVisibility(const gfx::Rect& visible_area,
gfx::Rect* bounds) {
AdjustBoundsSmallerThan(visible_area.size(), bounds);
- min_width = std::min(min_width, visible_area.width());
- min_height = std::min(min_height, visible_area.height());
+ min_width =
+ std::min(std::min(min_width, visible_area.width()), bounds->width());
+ min_height =
+ std::min(std::min(min_height, visible_area.height()), bounds->height());
if (bounds->right() < visible_area.x() + min_width) {
bounds->set_x(visible_area.x() + min_width - bounds->width());
« no previous file with comments | « ash/wm/lock_layout_manager_unittest.cc ('k') | ash/wm/window_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698