summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 22:25:11 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 22:25:11 +0000
commitc73d992928c7765c3d31e56dd2e7864c194895cf (patch)
treeaf5dfa88c7e35437e2b883f90790aeb5d174e13e /ash
parentb6d544ebb4e1087a1ba5661776afad930bd81ad4 (diff)
downloadchromium_src-c73d992928c7765c3d31e56dd2e7864c194895cf.zip
chromium_src-c73d992928c7765c3d31e56dd2e7864c194895cf.tar.gz
chromium_src-c73d992928c7765c3d31e56dd2e7864c194895cf.tar.bz2
Makes the bottom of snapped windows ignore the grid. This is necessary
in auto-hide mode since the launcher height (2 pixels) doesn't align to the grid. BUG=122001 TEST=see bug R=sadrul@chromium.org Review URL: https://chromiumcodereview.appspot.com/10066023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/wm/workspace/snap_sizer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ash/wm/workspace/snap_sizer.cc b/ash/wm/workspace/snap_sizer.cc
index d81e722..9b064e7 100644
--- a/ash/wm/workspace/snap_sizer.cc
+++ b/ash/wm/workspace/snap_sizer.cc
@@ -96,8 +96,9 @@ void SnapSizer::ChangeBounds(int x, int delta) {
gfx::Rect SnapSizer::GetTargetBounds() const {
gfx::Rect work_area(ScreenAsh::GetUnmaximizedWorkAreaBounds(window_));
int y = WindowResizer::AlignToGridRoundUp(work_area.y(), grid_size_);
- int max_y =
- WindowResizer::AlignToGridRoundDown(work_area.bottom(), grid_size_);
+ // We don't align to the bottom of the grid as the launcher may not
+ // necessarily align to the grid (happens when auto-hidden).
+ int max_y = work_area.bottom();
int width = static_cast<float>(work_area.width()) * kPercents[percent_index_];
if (edge_ == LEFT_EDGE) {
int x = WindowResizer::AlignToGridRoundUp(work_area.x(), grid_size_);