| 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 db099179f44f11be6de5ad79f671de3fec268350..46334452c1d386e4e4c48efdb4772d394e47efaa 100644
|
| --- a/ash/common/wm/overview/window_selector.cc
|
| +++ b/ash/common/wm/overview/window_selector.cc
|
| @@ -392,8 +392,6 @@ void WindowSelector::Shutdown() {
|
| remaining_items += window_grid->size();
|
| }
|
|
|
| - // Setting focus after restoring windows' state avoids unnecessary animations.
|
| - ResetFocusRestoreWindow(true);
|
| RemoveAllObservers();
|
|
|
| std::vector<WmWindow*> root_windows = WmShell::Get()->GetAllRootWindows();
|
| @@ -406,6 +404,12 @@ void WindowSelector::Shutdown() {
|
| for (std::unique_ptr<WindowGrid>& window_grid : grid_list_)
|
| window_grid->Shutdown();
|
|
|
| + // Setting focus last so that:
|
| + // 1) DockeWindowLayoutManager uses the restored state to re-layout upon
|
| + // activation.
|
| + // 2) Any bounds change due to activation should not result in reposition.
|
| + ResetFocusRestoreWindow(true);
|
| +
|
| DCHECK(num_items_ >= remaining_items);
|
| UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.OverviewClosedItems",
|
| num_items_ - remaining_items);
|
|
|