diff options
author | yusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 00:30:53 +0000 |
---|---|---|
committer | yusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 00:30:53 +0000 |
commit | 09f32904853af5a0812ae6d2dbc3e5c4b00fa7ac (patch) | |
tree | e42af0eb804ef783a80d219d59f8bb64d0278bfb /ash/wm/window_util.cc | |
parent | e0535b0393452e6fc8fb1fd71f256bc5f132cb1f (diff) | |
download | chromium_src-09f32904853af5a0812ae6d2dbc3e5c4b00fa7ac.zip chromium_src-09f32904853af5a0812ae6d2dbc3e5c4b00fa7ac.tar.gz chromium_src-09f32904853af5a0812ae6d2dbc3e5c4b00fa7ac.tar.bz2 |
Modify r154335 to fix crbug.com/146394#c4 .
Add the second parameter |set_bounds| to wm::RecreateWindowLayers() so that the caller could ask the function to resize all layers when needed.
It seems that calling SetBounds for the parent window does not repaint the layers of its children.
BUG=146394
TEST=checked on lumpy with an external monitor
Review URL: https://chromiumcodereview.appspot.com/10907157
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/window_util.cc')
-rw-r--r-- | ash/wm/window_util.cc | 7 |
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; } |