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..4017497c24807e381d5d00ab5d68203d91f9c19a 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 the restored state to re-layout upon |
varkha
2016/08/16 22:38:35
nit: the the
oshima
2016/08/16 23:16:14
Done.
|
+ // activation. |
+ // 2) Any bounds change due to activation should not result in repositioin. |
varkha
2016/08/16 22:38:35
nit: typo - repositioin.
oshima
2016/08/16 23:16:14
Done.
|
+ ResetFocusRestoreWindow(true); |
+ |
DCHECK(num_items_ >= remaining_items); |
UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.OverviewClosedItems", |
num_items_ - remaining_items); |