| Index: ash/root_window_controller.cc
|
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
|
| index 9854d36a909a684c052bf5dcf9fd415781b5e1ad..28e3229120a0f0a49a35a9aa74635135e4b7b0fd 100644
|
| --- a/ash/root_window_controller.cc
|
| +++ b/ash/root_window_controller.cc
|
| @@ -501,12 +501,13 @@ void RootWindowController::UpdateShelfVisibility() {
|
| shelf_->shelf_layout_manager()->UpdateVisibilityState();
|
| }
|
|
|
| -const aura::Window* RootWindowController::GetFullscreenWindow() const {
|
| - const aura::Window* container = GetContainer(kShellWindowId_DefaultContainer);
|
| - for (size_t i = 0; i < container->children().size(); ++i) {
|
| - aura::Window* child = container->children()[i];
|
| - if (wm::IsWindowFullscreen(child))
|
| - return child;
|
| +const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const {
|
| + const aura::Window::Windows& windows =
|
| + GetContainer(kShellWindowId_DefaultContainer)->children();
|
| + for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
|
| + iter != windows.rend(); ++iter) {
|
| + if (wm::IsWindowFullscreen(*iter))
|
| + return *iter;
|
| }
|
| return NULL;
|
| }
|
|
|