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..247a2f7fea54e9e79c439ae7691edb1cfd6061b0 100644 |
--- a/ash/common/wm/overview/window_selector.cc |
+++ b/ash/common/wm/overview/window_selector.cc |
@@ -384,14 +384,6 @@ 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()) |
- window_selector_item->RestoreWindow(); |
- remaining_items += window_grid->size(); |
- } |
- |
// Setting focus after restoring windows' state avoids unnecessary animations. |
varkha
2016/08/15 23:09:25
This comment that I have added in https://coderevi
oshima
2016/08/16 17:40:03
Done.
|
ResetFocusRestoreWindow(true); |
RemoveAllObservers(); |
@@ -403,8 +395,13 @@ void WindowSelector::Shutdown() { |
PanelLayoutManager::Get(window)->SetShowCalloutWidgets(true); |
} |
- for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) |
+ size_t remaining_items = 0; |
+ for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) { |
+ for (WindowSelectorItem* window_selector_item : window_grid->window_list()) |
+ window_selector_item->RestoreWindow(); |
+ remaining_items += window_grid->size(); |
varkha
2016/08/15 23:09:25
Hmm. This seems right, I probably did the wrong th
oshima
2016/08/16 17:40:03
Thanks for the info. Looks like this has to be aft
|
window_grid->Shutdown(); |
+ } |
DCHECK(num_items_ >= remaining_items); |
UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.OverviewClosedItems", |