Commit 9b1a330b authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

splitview: Fix edge case where overview mode should end but does not.

This CL addresses a case where one user profile has one and only one
window and it is snapped, and another user profile has no windows.
Overview mode shall end when you switch from the profile with the
snapped window to the one with no windows.

Test: manual
Bug: 934477
Change-Id: I9f55ee8c5adfde148d6b27e5e0aee9d52f788985
Reviewed-on: https://chromium-review.googlesource.com/c/1481799Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634790}
parent adcc57bf
......@@ -874,11 +874,12 @@ void SplitViewController::OnActiveUserSessionChanged(const AccountId&) {
break;
}
// If there is a window snapped to one side but no window snapped to the other
// side, then overview should be started (to be seen on the side with no
// snapped window).
// Ensure that overview mode is active if and only if there is a window
// snapped to one side but no window snapped to the other side.
if (state_ == LEFT_SNAPPED || state_ == RIGHT_SNAPPED)
StartOverview();
else
EndOverview();
}
void SplitViewController::StartObserving(aura::Window* window) {
......
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