Index: ash/wm/root_window_layout_manager.cc |
diff --git a/ash/wm/root_window_layout_manager.cc b/ash/wm/root_window_layout_manager.cc |
index 53af79118c7b1e3e03ad94ff3a996e1f043f833f..55acb162935ae4dc5fd6245530b0f49c20484850 100644 |
--- a/ash/wm/root_window_layout_manager.cc |
+++ b/ash/wm/root_window_layout_manager.cc |
@@ -4,6 +4,7 @@ |
#include "ash/wm/root_window_layout_manager.h" |
+#include "ash/shell.h" |
#include "ui/aura/window.h" |
#include "ui/views/widget/widget.h" |
@@ -36,6 +37,10 @@ void RootWindowLayoutManager::OnWindowResized() { |
gfx::Rect fullscreen_bounds = |
gfx::Rect(owner_->bounds().width(), owner_->bounds().height()); |
+ // Change window mode before setting bounds on children so the children will |
+ // resize to fit the new workspace area. |
+ Shell::GetInstance()->SetWindowModeForMonitorSize(fullscreen_bounds.size()); |
+ |
aura::Window::Windows::const_iterator i; |
for (i = owner_->children().begin(); i != owner_->children().end(); ++i) |
(*i)->SetBounds(fullscreen_bounds); |