Chromium Code Reviews| Index: ash/common/wm/window_cycle_list.cc |
| diff --git a/ash/common/wm/window_cycle_list.cc b/ash/common/wm/window_cycle_list.cc |
| index f2318499bed5d3e98e18842a516d009f5a835297..ee92f738d19bf5e3e89830fee180826edb09f793 100644 |
| --- a/ash/common/wm/window_cycle_list.cc |
| +++ b/ash/common/wm/window_cycle_list.cc |
| @@ -613,14 +613,14 @@ void WindowCycleList::InitWindowCycleView() { |
| WmWindow* root_window = WmShell::Get()->GetRootWindowForNewWindows(); |
| root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( |
| widget, kShellWindowId_OverlayContainer, ¶ms); |
| - widget->Init(params); |
| - |
| - screen_observer_.Add(display::Screen::GetScreen()); |
| gfx::Rect widget_rect = root_window->GetDisplayNearestWindow().bounds(); |
| int widget_height = cycle_view_->GetPreferredSize().height(); |
| widget_rect.set_y((widget_rect.height() - widget_height) / 2); |
| widget_rect.set_height(widget_height); |
| - widget->SetBounds(widget_rect); |
| + params.bounds = widget_rect; |
| + widget->Init(params); |
| + |
| + screen_observer_.Add(display::Screen::GetScreen()); |
|
sky
2016/09/13 19:44:02
optional: if you're moving this around, how about
|
| widget->Show(); |
| widget->SetCapture(cycle_view_); |
| widget->set_auto_release_capture(false); |