| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index 2169b72ce24c1a090c1c2318e9b55124ef371ece..dcdf7147c6854101a79dafb75695814b689b9b06 100644
|
| --- a/ash/shell.cc
|
| +++ b/ash/shell.cc
|
| @@ -90,6 +90,10 @@
|
| #include "ash/accelerators/nested_dispatcher_controller.h"
|
| #endif
|
|
|
| +#if defined(USE_X11)
|
| +#include "ui/aura/monitor_change_observer_x11.h"
|
| +#endif
|
| +
|
| namespace ash {
|
|
|
| namespace {
|
| @@ -528,6 +532,9 @@ Shell::~Shell() {
|
| // The system tray needs to be reset before all the windows are destroyed.
|
| tray_.reset();
|
|
|
| + // Desroy secondary monitor's widgets before all the windows are destroyed.
|
| + monitor_controller_.reset();
|
| +
|
| // Delete containers now so that child windows does not access
|
| // observers when they are destructed.
|
| aura::RootWindow* root_window = GetRootWindow();
|
| @@ -561,6 +568,9 @@ Shell* Shell::CreateInstance(ShellDelegate* delegate) {
|
| CHECK(!instance_);
|
| aura::Env::GetInstance()->SetMonitorManager(
|
| new internal::MultiMonitorManager());
|
| +#if defined(USE_X11)
|
| + aura::Env::GetInstance()->monitor_change_observer()->NotifyMonitorChange();
|
| +#endif
|
| instance_ = new Shell(delegate);
|
| instance_->Init();
|
| return instance_;
|
|
|