summaryrefslogtreecommitdiffstats
path: root/ash/wm/window_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/wm/window_util.cc')
-rw-r--r--ash/wm/window_util.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index 50203e8..cfbacdc 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -102,15 +102,18 @@ void CenterWindow(aura::Window* window) {
window->SetBounds(center);
}
-ui::Layer* RecreateWindowLayers(aura::Window* window) {
+ui::Layer* RecreateWindowLayers(aura::Window* window, bool set_bounds) {
+ const gfx::Rect bounds = window->bounds();
ui::Layer* old_layer = window->RecreateLayer();
DCHECK(old_layer);
for (aura::Window::Windows::const_iterator it = window->children().begin();
it != window->children().end();
++it) {
// Maintain the hierarchy of the detached layers.
- old_layer->Add(RecreateWindowLayers(*it));
+ old_layer->Add(RecreateWindowLayers(*it, set_bounds));
}
+ if (set_bounds)
+ window->SetBounds(bounds);
return old_layer;
}