Chromium Code Reviews| Index: ash/common/wm/overview/window_selector.cc |
| diff --git a/ash/common/wm/overview/window_selector.cc b/ash/common/wm/overview/window_selector.cc |
| index b24142b14492ce3febf825e12b5aea27378d7c57..db099179f44f11be6de5ad79f671de3fec268350 100644 |
| --- a/ash/common/wm/overview/window_selector.cc |
| +++ b/ash/common/wm/overview/window_selector.cc |
| @@ -381,6 +381,10 @@ void WindowSelector::Init(const WindowList& windows) { |
| // may cause other, unrelated classes, (ie PanelLayoutManager) to make indirect |
| // calls to restoring_minimized_windows() on a partially destructed object. |
| void WindowSelector::Shutdown() { |
| + // Stop observing screen metrics changes first to avoid auto-positioning |
| + // windows in response to work area changes from window activation. |
| + display::Screen::GetScreen()->RemoveObserver(this); |
| + |
| size_t remaining_items = 0; |
| for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) { |
| for (WindowSelectorItem* window_selector_item : window_grid->window_list()) |
| @@ -553,12 +557,8 @@ void WindowSelector::OnDisplayRemoved(const display::Display& display) { |
| void WindowSelector::OnDisplayMetricsChanged(const display::Display& display, |
| uint32_t metrics) { |
| - // If only the work area changes, there is no need to reposition windows in |
| - // overview. |
| - if (metrics != DISPLAY_METRIC_WORK_AREA) { |
|
oshima
2016/08/09 10:59:56
Note that we used to ignore work area only metrics
varkha
2016/08/09 13:13:39
Yes, this callback is here to position windows and
|
| - PositionWindows(/* animate */ false); |
| - RepositionTextFilterOnDisplayMetricsChange(); |
| - } |
| + PositionWindows(/* animate */ false); |
| + RepositionTextFilterOnDisplayMetricsChange(); |
| } |
| void WindowSelector::OnWindowTreeChanged(WmWindow* window, |