Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: ash/common/wm/overview/window_selector.cc

Issue 2244173006: Reset the focus after windows are restored, and grids are shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698