| 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 f388632d19ec77cd9b843e6931ca8c26428ac98f..7a3151718c19ae3cbcffe02dcac50407cd7b63ec 100644
|
| --- a/ash/wm/workspace/workspace_layout_manager.cc
|
| +++ b/ash/wm/workspace/workspace_layout_manager.cc
|
| @@ -267,23 +267,18 @@ void WorkspaceLayoutManager::AdjustWindowBoundsWhenAdded(
|
| Window* window = window_state->window();
|
| gfx::Rect bounds = window->bounds();
|
|
|
| + if (window_state->is_dragged())
|
| + return;
|
| +
|
| + if (SetMaximizedOrFullscreenBounds(window_state))
|
| + return;
|
| +
|
| // Use entire display instead of workarea because the workarea can
|
| // be further shrunk by the docked area. The logic ensures 30%
|
| // visibility which should be enough to see where the window gets
|
| // 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(
|
|
|