| Index: ash/root_window_controller.cc
|
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
|
| index a3ec7395f4fbf95b5b91d5360229a98443359f3d..6608e3172ea2e7bb8685d877edeb2dfae095445a 100644
|
| --- a/ash/root_window_controller.cc
|
| +++ b/ash/root_window_controller.cc
|
| @@ -31,6 +31,7 @@
|
| #include "ash/touch/touch_observer_hud.h"
|
| #include "ash/wm/always_on_top_controller.h"
|
| #include "ash/wm/dock/docked_window_layout_manager.h"
|
| +#include "ash/wm/mru_window_tracker.h"
|
| #include "ash/wm/panels/panel_layout_manager.h"
|
| #include "ash/wm/panels/panel_window_event_handler.h"
|
| #include "ash/wm/root_window_layout_manager.h"
|
| @@ -569,18 +570,14 @@ void RootWindowController::UpdateShelfVisibility() {
|
| }
|
|
|
| const aura::Window* RootWindowController::GetWindowForFullscreenMode() const {
|
| - const aura::Window::Windows& windows =
|
| - GetContainer(kShellWindowId_DefaultContainer)->children();
|
| const aura::Window* topmost_window = NULL;
|
| - for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
|
| - iter != windows.rend(); ++iter) {
|
| - if (((*iter)->type() == ui::wm::WINDOW_TYPE_NORMAL ||
|
| - (*iter)->type() == ui::wm::WINDOW_TYPE_PANEL) &&
|
| - (*iter)->layer()->GetTargetVisibility()) {
|
| - topmost_window = *iter;
|
| - break;
|
| - }
|
| + if (Shell::GetInstance()->mru_window_tracker()) {
|
| + topmost_window = Shell::GetInstance()->mru_window_tracker()->
|
| + GetMruWindowInRoot(root_window());
|
| }
|
| +
|
| + // If any transient parent of the active window is fullscreen the root
|
| + // window should remain in fullscreen mode.
|
| while (topmost_window) {
|
| if (wm::GetWindowState(topmost_window)->IsFullscreen())
|
| return topmost_window;
|
|
|