diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-12 15:26:59 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-12 15:26:59 +0000 |
commit | 283794fa145a785af7dc74020ff66cdc1552239a (patch) | |
tree | 605185303165ea8a02d0c042983209bbabaa3388 /ash | |
parent | 24eea16cb849a85b22ff6460358ecfcfe4f81279 (diff) | |
download | chromium_src-283794fa145a785af7dc74020ff66cdc1552239a.zip chromium_src-283794fa145a785af7dc74020ff66cdc1552239a.tar.gz chromium_src-283794fa145a785af7dc74020ff66cdc1552239a.tar.bz2 |
Makes window snapping take auto-hide behavior into
consideration. Otherwise it would snap to a position that assumes the
launcher is there, when it isn't.
BUG=122404
TEST=see bug
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10065006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/shelf_layout_manager.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc index 2d3abad..f53bb7b 100644 --- a/ash/wm/shelf_layout_manager.cc +++ b/ash/wm/shelf_layout_manager.cc @@ -151,7 +151,10 @@ gfx::Rect ShelfLayoutManager::GetUnmaximizedWorkAreaBounds( aura::Window* window) const { // TODO: needs to be multi-mon aware. gfx::Rect bounds(gfx::Screen::GetMonitorAreaNearestWindow(window)); - bounds.set_height(bounds.height() - shelf_height_); + if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) + bounds.set_height(bounds.height() - kAutoHideHeight); + else + bounds.set_height(bounds.height() - shelf_height_); return bounds; } |