Chromium Code Reviews| Index: athena/wm/window_manager_impl.cc |
| diff --git a/athena/wm/window_manager_impl.cc b/athena/wm/window_manager_impl.cc |
| index 3e6e3904f63c3010949e1e95bfaf866ddf3bb69b..14939f579697711510c9c2710ad77b5c874bda74 100644 |
| --- a/athena/wm/window_manager_impl.cc |
| +++ b/athena/wm/window_manager_impl.cc |
| @@ -16,6 +16,7 @@ |
| #include "athena/wm/window_overview_mode.h" |
| #include "base/bind.h" |
| #include "base/logging.h" |
| +#include "ui/aura/client/aura_constants.h" |
| #include "ui/aura/layout_manager.h" |
| #include "ui/aura/window.h" |
| #include "ui/compositor/closure_animation_observer.h" |
| @@ -304,7 +305,11 @@ void WindowManagerImpl::OnSelectWindow(aura::Window* window) { |
| // resized. |
| const gfx::Size work_area = |
| gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area().size(); |
| - if (window->GetTargetBounds().size() != work_area) { |
| + |
| + // Make sure that the window can be maximized before resizing. |
| + bool can_maximize = window->GetProperty(aura::client::kCanMaximizeKey); |
|
oshima
2014/10/22 20:03:21
it should check both
can maximize and if it has ma
|
| + |
| + if (window->GetTargetBounds().size() != work_area && can_maximize) { |
| const gfx::Rect& window_bounds = window->bounds(); |
| const gfx::Rect desired_bounds(work_area); |
| gfx::Transform transform; |