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

Unified Diff: ash/common/shelf/shelf_layout_manager.cc

Issue 2534953006: Fix shelf auto-hide calculation for app-list visibility. (Closed)
Patch Set: Cleanup. Created 4 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 | « no previous file | ash/common/wm_shell.h » ('j') | ash/common/wm_shell.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_layout_manager.cc
diff --git a/ash/common/shelf/shelf_layout_manager.cc b/ash/common/shelf/shelf_layout_manager.cc
index d48defb892990c74294342ddb4d8a63858b95a4d..f7030da97952bcbf3693ffa73b5117e2c02e0b34 100644
--- a/ash/common/shelf/shelf_layout_manager.cc
+++ b/ash/common/shelf/shelf_layout_manager.cc
@@ -837,10 +837,9 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState(
// Unhide the shelf only on the active screen when the AppList is shown
// (crbug.com/312445).
- if (WmShell::Get()->GetAppListTargetVisibility()) {
- WmWindow* window = WmShell::Get()->GetActiveWindow();
- if (window && window->GetDisplayNearestWindow().id() == shelf_display_id)
- return SHELF_AUTO_HIDE_SHOWN;
+ if (WmShell::Get()->GetAppListTargetVisibility(shelf_display_id) ||
+ WmShell::Get()->IsApplistVisible(shelf_display_id)) {
+ return SHELF_AUTO_HIDE_SHOWN;
}
if (shelf_widget_->status_area_widget() &&
« no previous file with comments | « no previous file | ash/common/wm_shell.h » ('j') | ash/common/wm_shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698