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..839586facb8f9658153304ea56736fa1418427d1 100644 |
--- a/ash/wm/workspace/workspace_layout_manager.cc |
+++ b/ash/wm/workspace/workspace_layout_manager.cc |
@@ -260,23 +260,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; |
+ |
varkha
2014/01/09 05:21:22
nit: Could early return before line 260.
oshima
2014/01/09 18:07:19
done. consolidated all three to one if.
|
// 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( |