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() && |