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

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: Merge with master. 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
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 45c0f7a6372d750e7f0a6d9088f6c7024f9a02d4..4775accf97bef059a26cf8474e8f7de4c31056ea 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -518,23 +518,27 @@ 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_NORMAL ||
+ (*iter)->type() == aura::client::WINDOW_TYPE_PANEL) &&
+ (*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() {
- return const_cast<aura::Window*>(
- const_cast<const RootWindowController*>(this)->
- GetTopmostFullscreenWindow());
-}
-
void RootWindowController::ActivateKeyboard(
keyboard::KeyboardController* keyboard_controller) {
if (!keyboard::IsKeyboardEnabled() ||
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698