Commit 0563bb60 authored by oshima's avatar oshima Committed by Commit bot

Revert of Reset the focus after windows are restored, and grids are shutdown....

Revert of Reset the focus after windows are restored, and grids are shutdown. (patchset #4 id:60001 of https://codereview.chromium.org/2244173006/ )

Reason for revert:
Reverting because this can cause crash with arc++ windows.

Original issue's description:
> ResetFocusRestoreWindow may change activation, which can resize the window, which then results in reposition. This prevents it by updating the focus after grids are shutdown.
>
> BUG=634572
>
> Committed: https://crrev.com/e26c7e4886eec4d2c58a5810b6440f7faa4293ea
> Cr-Commit-Position: refs/heads/master@{#412384}

TBR=varkha@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=634572

Review-Url: https://codereview.chromium.org/2251053003
Cr-Commit-Position: refs/heads/master@{#412602}
parent d426e0ce
......@@ -392,6 +392,8 @@ 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();
......@@ -404,12 +406,6 @@ 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment