Index: ash/wm/base_layout_manager.cc |
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc |
index d79922da3ca3e3af4b5a24228e281f0a8b46d304..2ff9b14c6f7940a1fc39975f32b5e49ea94f3c14 100644 |
--- a/ash/wm/base_layout_manager.cc |
+++ b/ash/wm/base_layout_manager.cc |
@@ -67,10 +67,20 @@ void BaseLayoutManager::SetChildBounds(aura::Window* child, |
// BaseLayoutManager, RootWindowObserver overrides: |
void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) { |
+ AdjustWindowSizesForScreenChange(); |
+} |
+ |
+void BaseLayoutManager::OnScreenWorkAreaInsetsChanged() { |
+ AdjustWindowSizesForScreenChange(); |
+} |
+ |
+void BaseLayoutManager::AdjustWindowSizesForScreenChange() { |
// If a user plugs an external monitor into a laptop running Aura the |
// monitor size will change. Maximized windows need to resize to match. |
// We also do this when developers running Aura on a desktop manually resize |
// the host window. |
+ // We also need to do this when user toggles between full screen mode and |
+ // normal mode with maximized windows. |
for (WindowSet::const_iterator it = windows_.begin(); |
it != windows_.end(); |
++it) { |