diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 21:58:23 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 21:58:23 +0000 |
commit | 112b6f7e9e5b8a3cbfdf404bc4664b9b9b42a10b (patch) | |
tree | e4ef099c738267a1a92c58d2a7b99a232369624d /ash/wm/drag_window_resizer.cc | |
parent | 4ca330499fbb8186a94cef6978897c9310e34660 (diff) | |
download | chromium_src-112b6f7e9e5b8a3cbfdf404bc4664b9b9b42a10b.zip chromium_src-112b6f7e9e5b8a3cbfdf404bc4664b9b9b42a10b.tar.gz chromium_src-112b6f7e9e5b8a3cbfdf404bc4664b9b9b42a10b.tar.bz2 |
Fix AdjustBoundsToEnsureWindowVisibility to work with non primary display bounds
This was asssuming that the visibile area has 0,0 origin.
Move the code to ensure minimum visibility when added, from
WorkspaceLayoutManager to DragWindowResizer.
BUG=none
TEST=WindowUtilTest.AdjustBoundsToEnsureWindowVisibility.
This also fixes the test that was failing.
TBR=oshima@chromium.org
Review URL: https://codereview.chromium.org/106303005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/drag_window_resizer.cc')
-rw-r--r-- | ash/wm/drag_window_resizer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc index 2a859cf..835b204 100644 --- a/ash/wm/drag_window_resizer.cc +++ b/ash/wm/drag_window_resizer.cc @@ -13,6 +13,7 @@ #include "ash/wm/coordinate_conversion.h" #include "ash/wm/drag_window_controller.h" #include "ash/wm/window_state.h" +#include "ash/wm/window_util.h" #include "base/memory/weak_ptr.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/env.h" @@ -149,6 +150,9 @@ void DragWindowResizer::CompleteDrag() { dst_bounds.set_x( last_mouse_location_in_screen.x() - dst_bounds.width()); } + ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility( + dst_display.bounds(), &dst_bounds); + GetTarget()->SetBoundsInScreen(dst_bounds, dst_display); } } |