Commit c98a492f authored by flackr@chromium.org's avatar flackr@chromium.org

Change active root window before closing old root windows' children.

BUG=282582

Review URL: https://chromiumcodereview.appspot.com/23494022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221497 0039d316-1c4b-4281-b951-d872f2087c98
parent 8fd22b78
......@@ -271,12 +271,17 @@ void RootWindowController::Shutdown() {
wallpaper_controller_.reset();
animating_wallpaper_controller_.reset();
CloseChildWindows();
// Change the active root window before closing child windows. If any child
// being removed triggers a relayout of the shelf it will try to build a
// window list adding windows from the active root window's containers which
// may have already gone away.
if (Shell::GetActiveRootWindow() == root_window_) {
Shell::GetInstance()->set_active_root_window(
Shell::GetPrimaryRootWindow() == root_window_.get() ?
NULL : Shell::GetPrimaryRootWindow());
}
CloseChildWindows();
SetRootWindowController(root_window_.get(), NULL);
screen_dimmer_.reset();
workspace_controller_.reset();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment