Index: ash/root_window_controller.cc |
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
index 45c0f7a6372d750e7f0a6d9088f6c7024f9a02d4..199b75d20bc48ac9f494be69a263f448df57151b 100644 |
--- a/ash/root_window_controller.cc |
+++ b/ash/root_window_controller.cc |
@@ -518,21 +518,30 @@ void RootWindowController::UpdateShelfVisibility() { |
shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
} |
-const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const { |
+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 (wm::GetWindowState(*iter)->IsFullscreen()) |
- return *iter; |
+ if ((*iter)->type() != aura::client::WINDOW_TYPE_POPUP && |
oshima
2013/12/05 19:08:58
can this be == TYPE_NORMAL?
flackr
2013/12/05 19:30:21
== TYPE_NORMAL || == TYPE_PANEL
Done.
|
+ (*iter)->layer()->GetTargetVisibility()) { |
+ topmost_window = *iter; |
+ break; |
+ } |
+ } |
+ while (topmost_window) { |
+ if (wm::GetWindowState(topmost_window)->IsFullscreen()) |
+ return topmost_window; |
+ topmost_window = topmost_window->transient_parent(); |
} |
return NULL; |
} |
-aura::Window* RootWindowController::GetTopmostFullscreenWindow() { |
+aura::Window* RootWindowController::GetWindowForFullscreenMode() { |
return const_cast<aura::Window*>( |
const_cast<const RootWindowController*>(this)-> |
- GetTopmostFullscreenWindow()); |
+ GetWindowForFullscreenMode()); |
} |
void RootWindowController::ActivateKeyboard( |