Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2220)

Unified Diff: ash/root_window_controller.cc

Issue 23494022: Change active root window before closing old root windows' children. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 9854d36a909a684c052bf5dcf9fd415781b5e1ad..27f0a0144d48736b8a5c70a49245e94c768a8636 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698