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

Unified Diff: ash/root_window_controller.cc

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « ash/root_window_controller.h ('k') | ash/ui_controls_ash.cc » ('j') | 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 77caab844e83c187c82200229277699685134184..1e380593d29eb9054d96e2d625223d3bc78099e3 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -8,6 +8,7 @@
#include "ash/desktop_background/desktop_background_widget_controller.h"
#include "ash/display/display_controller.h"
+#include "ash/display/multi_display_manager.h"
#include "ash/shell.h"
#include "ash/shell_factory.h"
#include "ash/shell_window_ids.h"
@@ -295,6 +296,12 @@ RootWindowController::RootWindowController(aura::RootWindow* root_window)
}
RootWindowController::~RootWindowController() {
+ Shutdown();
+ root_window_.reset();
+}
+
+void RootWindowController::Shutdown() {
+ CloseChildWindows();
if (Shell::GetActiveRootWindow() == root_window_.get()) {
Shell::GetInstance()->set_active_root_window(
Shell::GetPrimaryRootWindow() == root_window_.get() ?
@@ -304,7 +311,11 @@ RootWindowController::~RootWindowController() {
event_client_.reset();
screen_dimmer_.reset();
workspace_controller_.reset();
- root_window_.reset();
+ // Forget with the display ID so that display lookup
+ // ends up with invalid display.
+ root_window_->ClearProperty(kDisplayIdKey);
+ // And this root window should no longer process events.
+ root_window_->PrepareForShutdown();
}
aura::Window* RootWindowController::GetContainer(int container_id) {
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/ui_controls_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698