| Index: ash/wm/window_resizer.cc
|
| diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
|
| index 3773d0735099072ee932d1ffc915df274181a16b..b5aa3d8a9dd9f9a03e66b935af01276e5a619cdc 100644
|
| --- a/ash/wm/window_resizer.cc
|
| +++ b/ash/wm/window_resizer.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ash/screen_ash.h"
|
| #include "ash/shell.h"
|
| +#include "ash/wm/dock/dock_edge_types.h"
|
| #include "ash/wm/property_util.h"
|
| #include "ash/wm/window_util.h"
|
| #include "ui/aura/client/aura_constants.h"
|
| @@ -176,7 +177,9 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
|
|
|
| gfx::Point location = passed_location;
|
| gfx::Rect work_area =
|
| - ScreenAsh::GetDisplayWorkAreaBoundsInParent(details.window);
|
| + (GetDockEdges(details.window) == DOCK_EDGE_NONE) ?
|
| + ScreenAsh::GetDisplayWorkAreaBoundsInParent(details.window) :
|
| + ScreenAsh::GetDisplayBoundsInParent(details.window);
|
|
|
| int delta_x = location.x() - details.initial_location_in_parent.x();
|
| int delta_y = location.y() - details.initial_location_in_parent.y();
|
| @@ -248,7 +251,11 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
|
| ScreenAsh::ConvertRectToScreen(parent, new_bounds);
|
| const gfx::Display& display =
|
| Shell::GetScreen()->GetDisplayMatching(new_bounds_in_screen);
|
| - gfx::Rect screen_work_area = display.work_area();
|
| + gfx::Rect screen_work_area;
|
| + if (GetDockEdges(details.window) == DOCK_EDGE_NONE)
|
| + screen_work_area = display.work_area();
|
| + else
|
| + screen_work_area = display.bounds();
|
| screen_work_area.Inset(kMinimumOnScreenArea, 0);
|
| if (!screen_work_area.Intersects(new_bounds_in_screen)) {
|
| // Make sure that the x origin does not leave the current display.
|
|
|