summaryrefslogtreecommitdiffstats
path: root/ash/root_window_controller.cc
diff options
context:
space:
mode:
authorflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 05:33:29 +0000
committerflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 05:33:29 +0000
commit5b602190c3a6b949cfb74157e8b7c1ecf61bed36 (patch)
treea9a140196363fac1152c1520c57a7111c8787084 /ash/root_window_controller.cc
parent9c233029a88b2b529a119f951361cb803987d5c1 (diff)
downloadchromium_src-5b602190c3a6b949cfb74157e8b7c1ecf61bed36.zip
chromium_src-5b602190c3a6b949cfb74157e8b7c1ecf61bed36.tar.gz
chromium_src-5b602190c3a6b949cfb74157e8b7c1ecf61bed36.tar.bz2
Create a separate callout widget per panel which displays over each icon.
BUG=162960 TEST=PanelManagerLayoutTest.MinimizeRestorePanel, PanelManagerLayoutTest.MultiplePanelCallout, RootWindowControllerTest.MoveWindows_Basic Review URL: https://chromiumcodereview.appspot.com/12282046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/root_window_controller.cc')
-rw-r--r--ash/root_window_controller.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 71c9101..dcb3bab 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -134,16 +134,20 @@ void ReparentAllWindows(aura::RootWindow* src, aura::RootWindow* dst) {
aura::Window* src_container = Shell::GetContainer(src, id);
aura::Window* dst_container = Shell::GetContainer(dst, id);
- aura::Window::Windows children = src_container->children();
- for (aura::Window::Windows::iterator iter = children.begin();
- iter != children.end(); ++iter) {
- aura::Window* window = *iter;
- // Don't move modal screen.
- if (internal::SystemModalContainerLayoutManager::IsModalBackground(
- window))
- continue;
-
- ReparentWindow(window, dst_container);
+ while (!src_container->children().empty()) {
+ // Restart iteration from the source container windows each time as they
+ // may change as a result of moving other windows.
+ aura::Window::Windows::const_iterator iter =
+ src_container->children().begin();
+ while (iter != src_container->children().end() &&
+ internal::SystemModalContainerLayoutManager::IsModalBackground(
+ *iter)) {
+ ++iter;
+ }
+ // If the entire window list is modal background windows then stop.
+ if (iter == src_container->children().end())
+ break;
+ ReparentWindow(*iter, dst_container);
}
}
}