diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 09:15:45 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 09:15:45 +0000 |
commit | 6675e1ca1873419b431878bdf31a8616ef8d6a44 (patch) | |
tree | 2b7a3617cb1161149440caf5ed770907e95105f3 /ash/root_window_controller.cc | |
parent | 1561a015d42e119c7da3c69ca6f6326970110426 (diff) | |
download | chromium_src-6675e1ca1873419b431878bdf31a8616ef8d6a44.zip chromium_src-6675e1ca1873419b431878bdf31a8616ef8d6a44.tar.gz chromium_src-6675e1ca1873419b431878bdf31a8616ef8d6a44.tar.bz2 |
Cancel drag if display configuration changes.
* Removed debug specific shortcut to emulate display change.
* fixed ui_controls to use the correct position
* a few minor clean ups (removing unnecessary namesapce,
rename Monitor -> Display)
BUG=14457
TEST=covered by test
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155762
Review URL: https://chromiumcodereview.appspot.com/10909043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/root_window_controller.cc')
-rw-r--r-- | ash/root_window_controller.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 77caab8..1e38059 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) { |