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

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

Issue 2251053003: Revert of 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 46334452c1d386e4e4c48efdb4772d394e47efaa..db099179f44f11be6de5ad79f671de3fec268350 100644
--- a/ash/common/wm/overview/window_selector.cc
+++ b/ash/common/wm/overview/window_selector.cc
@@ -392,6 +392,8 @@
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();
@@ -403,12 +405,6 @@
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",
« 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