Index: trunk/src/ash/wm/workspace/workspace_layout_manager.cc |
=================================================================== |
--- trunk/src/ash/wm/workspace/workspace_layout_manager.cc (revision 244019) |
+++ trunk/src/ash/wm/workspace/workspace_layout_manager.cc (working copy) |
@@ -254,11 +254,8 @@ |
// 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() || |
- window_state->is_dragged() || |
- SetMaximizedOrFullscreenBounds(window_state)) { |
+ if (window_state->window()->bounds().IsEmpty()) |
return; |
- } |
Window* window = window_state->window(); |
gfx::Rect bounds = window->bounds(); |
@@ -269,6 +266,17 @@ |
// 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( |