| Index: ash/wm/window_positioner.cc
|
| diff --git a/ash/wm/window_positioner.cc b/ash/wm/window_positioner.cc
|
| index 58f4fb91dd54b12c19b1884dd03affe5d9aa365e..f5b0da6662ef5342da59c97fd4bd0a1125581797 100644
|
| --- a/ash/wm/window_positioner.cc
|
| +++ b/ash/wm/window_positioner.cc
|
| @@ -283,11 +283,23 @@ bool WindowPositioner::DisableAutoPositioning(bool ignore) {
|
| void WindowPositioner::RearrangeVisibleWindowOnShow(
|
| aura::Window* added_window) {
|
| wm::WindowState* added_window_state = wm::GetWindowState(added_window);
|
| + if (!added_window->TargetVisibility())
|
| + return;
|
|
|
| if (!UseAutoWindowManager(added_window) ||
|
| - added_window_state->bounds_changed_by_user() ||
|
| - !added_window->TargetVisibility())
|
| + added_window_state->bounds_changed_by_user()) {
|
| + if (added_window_state->minimum_visibility()) {
|
| + // Guarante minimum visibility within the work area.
|
| + gfx::Rect work_area = GetWorkAreaForWindowInParent(added_window);
|
| + gfx::Rect bounds = added_window->bounds();
|
| + gfx::Rect new_bounds = bounds;
|
| + ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area,
|
| + &new_bounds);
|
| + if (new_bounds != bounds)
|
| + added_window->SetBounds(new_bounds);
|
| + }
|
| return;
|
| + }
|
| // Find a single open managed window.
|
| bool single_window;
|
| aura::Window* other_shown_window = GetReferenceWindow(
|
|
|