diff options
Diffstat (limited to 'ash/root_window_controller.cc')
-rw-r--r-- | ash/root_window_controller.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 3e46f50..7039d56 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc @@ -302,8 +302,11 @@ void RootWindowController::ShowLauncher() { void RootWindowController::OnLauncherCreated() { if (panel_layout_manager_) panel_layout_manager_->SetLauncher(shelf_->launcher()); - if (docked_layout_manager_) + if (docked_layout_manager_) { docked_layout_manager_->SetLauncher(shelf_->launcher()); + if (shelf_->shelf_layout_manager()) + docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager()); + } } void RootWindowController::UpdateAfterLoginStatusChange( @@ -353,6 +356,13 @@ void RootWindowController::CloseChildWindows() { panel_layout_manager_->Shutdown(); panel_layout_manager_ = NULL; } + // docked_layout_manager_ needs to be shut down before windows are destroyed. + if (docked_layout_manager_) { + if (shelf_->shelf_layout_manager()) + docked_layout_manager_->RemoveObserver(shelf_->shelf_layout_manager()); + docked_layout_manager_->Shutdown(); + docked_layout_manager_ = NULL; + } // TODO(harrym): Remove when Status Area Widget is a child view. shelf_->ShutdownStatusAreaWidget(); |