Commit 8dcc0898 authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

overview: Revise misleading comment

There is a comment that speaks of handling "when there is a window being
dragged" but only checks if the active window is being dragged. It seems
based on a mistaken assumption that a dragged window must be active. The
behavior is actually reasonable because the purpose is to avoid stealing
activation from a dragged window, which is not a concern if the dragged
window is already inactive. Only the comment needs to be fixed.

Bug: None
Change-Id: I390eccc6370ad4ed7d15f2d32212fe43b0233633
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031641Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737858}
parent d56e2876
...@@ -396,9 +396,7 @@ void OverviewController::ToggleOverview( ...@@ -396,9 +396,7 @@ void OverviewController::ToggleOverview(
break; break;
} }
} }
// |should_focus_overview_| should also be false if overview starts when // Avoid stealing activation from a dragged active window.
// there is a window being dragged. Do not change the window activation as
// it might cause the unnecessary shelf item activition indicator change.
if (should_focus_overview_) { if (should_focus_overview_) {
aura::Window* active_window = window_util::GetActiveWindow(); aura::Window* active_window = window_util::GetActiveWindow();
if (active_window && WindowState::Get(active_window)->is_dragged()) { if (active_window && WindowState::Get(active_window)->is_dragged()) {
......
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