| Index: ash/wm/workspace/workspace_layout_manager.cc
|
| diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
|
| index 672cdedc843f9c1bee8953193d40fa43b1fe628e..2e893ae83cbec827d2cbf6fe3f939ed704a463ce 100644
|
| --- a/ash/wm/workspace/workspace_layout_manager.cc
|
| +++ b/ash/wm/workspace/workspace_layout_manager.cc
|
| @@ -254,8 +254,11 @@ void WorkspaceLayoutManager::AdjustWindowBoundsWhenAdded(
|
| // When a window is dragged and dropped onto a different
|
| // root window, the bounds will be updated after they are added
|
| // to the root window.
|
| - if (window_state->window()->bounds().IsEmpty())
|
| + if (window_state->window()->bounds().IsEmpty() ||
|
| + window_state->is_dragged() ||
|
| + SetMaximizedOrFullscreenBounds(window_state)) {
|
| return;
|
| + }
|
|
|
| Window* window = window_state->window();
|
| gfx::Rect bounds = window->bounds();
|
| @@ -266,17 +269,6 @@ void WorkspaceLayoutManager::AdjustWindowBoundsWhenAdded(
|
| // moved.
|
| gfx::Rect display_area = ScreenAsh::GetDisplayBoundsInParent(window);
|
|
|
| - if (window_state->is_dragged()) {
|
| - ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility(
|
| - display_area, &bounds);
|
| - if (window->bounds() != bounds)
|
| - window->SetBounds(bounds);
|
| - return;
|
| - }
|
| -
|
| - if (SetMaximizedOrFullscreenBounds(window_state))
|
| - return;
|
| -
|
| int min_width = bounds.width() * kMinimumPercentOnScreenArea;
|
| int min_height = bounds.height() * kMinimumPercentOnScreenArea;
|
| ash::wm::AdjustBoundsToEnsureWindowVisibility(
|
|
|