Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index 21af31b1ea29c6dd4ae24d33b6fdb4e43ec7f946..9a390ab52c7fdbfe5e025ac42c0eed2f90696de9 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -159,18 +159,9 @@ void CreateSpecialContainers(aura::RootWindow* root_window) { |
new ToplevelWindowEventFilter(always_on_top_container)); |
SetChildWindowVisibilityChangesAnimated(always_on_top_container); |
- aura::Window* panel_container = CreateContainer( |
- internal::kShellWindowId_PanelContainer, |
- "PanelContainer", |
- non_lock_screen_containers); |
- if (CommandLine::ForCurrentProcess()-> |
- HasSwitch(switches::kAuraPanelManager)) { |
- internal::PanelLayoutManager* layout_manager = |
- new internal::PanelLayoutManager(panel_container); |
- panel_container->SetEventFilter( |
- new internal::PanelWindowEventFilter(panel_container, layout_manager)); |
- panel_container->SetLayoutManager(layout_manager); |
- } |
+ CreateContainer(internal::kShellWindowId_PanelContainer, |
+ "PanelContainer", |
+ non_lock_screen_containers); |
CreateContainer(internal::kShellWindowId_AppListContainer, |
"AppListContainer", |
@@ -853,6 +844,8 @@ void Shell::CreateLauncher() { |
launcher_->SetFocusCycler(focus_cycler_.get()); |
shelf_->SetLauncher(launcher_.get()); |
+ if (panel_layout_manager_ != NULL) |
+ panel_layout_manager_->SetLauncher(launcher_.get()); |
launcher_->widget()->Show(); |
} |
@@ -920,6 +913,19 @@ void Shell::InitLayoutManagers() { |
int index = user_wallpaper_delegate_->GetUserWallpaperIndex(); |
desktop_background_controller_->SetDesktopBackgroundImageMode( |
GetWallpaper(index), GetWallpaperInfo(index).layout); |
+ |
+ // Create Panel layout manager |
+ if (CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kAuraPanelManager)) { |
+ aura::Window* panel_container = GetContainer( |
+ internal::kShellWindowId_PanelContainer); |
+ panel_layout_manager_ = |
+ new internal::PanelLayoutManager(panel_container); |
+ panel_container->SetEventFilter( |
+ new internal::PanelWindowEventFilter( |
+ panel_container, panel_layout_manager_)); |
+ panel_container->SetLayoutManager(panel_layout_manager_); |
+ } |
} |
void Shell::DisableWorkspaceGridLayout() { |