Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: ash/root_window_controller.cc

Issue 100903002: Ignore fullscreen windows which are behind other windows for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test that WorkspaceLayoutManager correctly notifies on fullscreen changes. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698