Chromium Code Reviews| Index: ash/root_window_controller.cc |
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
| index 45c0f7a6372d750e7f0a6d9088f6c7024f9a02d4..d1e7ca5462abd894d377b9460ec891735595a214 100644 |
| --- a/ash/root_window_controller.cc |
| +++ b/ash/root_window_controller.cc |
| @@ -521,10 +521,20 @@ void RootWindowController::UpdateShelfVisibility() { |
| const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const { |
|
pkotwicz
2013/12/05 02:46:29
Would GetWindowForFullscreenMode() / GetFullscreen
flackr
2013/12/05 16:48:54
Sounds like a good name to me, done.
|
| const aura::Window::Windows& windows = |
| GetContainer(kShellWindowId_DefaultContainer)->children(); |
| + const aura::Window* topmost_fullscreen_window = NULL; |
|
pkotwicz
2013/12/05 02:46:29
Rename to |topmost_window|.
flackr
2013/12/05 16:48:54
Done.
|
| 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 && |
| + (*iter)->layer()->GetTargetVisibility() && |
| + (*iter)->layer()->GetTargetOpacity() != 0.0f) { |
|
pkotwicz
2013/12/05 02:46:29
I wonder whether the target opacity check is still
flackr
2013/12/05 16:48:54
Looks like this has been the case since the maximi
|
| + topmost_fullscreen_window = *iter; |
| + break; |
| + } |
| + } |
| + while (topmost_fullscreen_window) { |
| + if (wm::GetWindowState(topmost_fullscreen_window)->IsFullscreen()) |
| + return topmost_fullscreen_window; |
| + topmost_fullscreen_window = topmost_fullscreen_window->transient_parent(); |
| } |
| return NULL; |
| } |