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

Unified Diff: ash/shelf/shelf_layout_manager.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/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 9fb6b88a65aeec9028bb190ba8d14c176cf05ca8..116e0140131ff4c6f5f2dcf39a142e67b3e865fe 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -318,8 +318,11 @@ void ShelfLayoutManager::UpdateVisibilityState() {
// when we are in SHELF_AUTO_HIDE_ALWAYS_HIDDEN.
WorkspaceWindowState window_state(workspace_controller_->GetWindowState());
switch (window_state) {
- case WORKSPACE_WINDOW_STATE_FULL_SCREEN:
- if (FullscreenWithHiddenShelf()) {
+ case WORKSPACE_WINDOW_STATE_FULL_SCREEN: {
+ const aura::Window* fullscreen_window = GetRootWindowController(
+ root_window_)->GetWindowForFullscreenMode();
+ if (fullscreen_window && wm::GetWindowState(fullscreen_window)->
+ hide_shelf_when_fullscreen()) {
SetState(SHELF_HIDDEN);
} else {
// The shelf is sometimes not hidden when in immersive fullscreen.
@@ -327,9 +330,12 @@ void ShelfLayoutManager::UpdateVisibilityState() {
SetState(SHELF_AUTO_HIDE);
}
break;
+ }
+
case WORKSPACE_WINDOW_STATE_MAXIMIZED:
SetState(CalculateShelfVisibility());
break;
+
case WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF:
case WORKSPACE_WINDOW_STATE_DEFAULT:
SetState(CalculateShelfVisibility());
@@ -537,16 +543,6 @@ bool ShelfLayoutManager::IsHorizontalAlignment() const {
GetAlignment() == SHELF_ALIGNMENT_TOP;
}
-bool ShelfLayoutManager::FullscreenWithHiddenShelf() const {
- RootWindowController* controller = GetRootWindowController(root_window_);
- if (!controller)
- return false;
- const aura::Window* window = controller->GetTopmostFullscreenWindow();
- if (!window)
- return false;
- return wm::GetWindowState(window)->hide_shelf_when_fullscreen();
-}
-
// static
ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) {
ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf();
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698