Commit 40a599f1 authored by Kazuki Takise's avatar Kazuki Takise Committed by Commit Bot

Kill overview first before finishing splitview

Currently, pressing the home button in splitview in tablet mode
causes unwanted maximized events for snapped windows.
In TabletModeWindowManager#OnOverviewModeEndingAnimationComplete(),
we intend to prevent this from happening by checking the snapped
windows.

However, in HomeScreenController#GoHome(), EndSplitView() is called
before EndOverview(). As EndSplitView() remove the snapped windows
from the the splitview controller, when EndOverview() is called,
the above logic to prevent them from being maximized is not working.

We can just fix this by killing overview before finishing splitview.

BUG=b:149315216
TEST=Manually confirmed pressing the home button in splitview in
TEST=tablet mode didn't cause unwanted maximized events.

Change-Id: I5ba411fca03f9c63afc7ae3084eb08473e562b34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2067840Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarStefan Kuhne <skuhne@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Kazuki Takise <takise@chromium.org>
Auto-Submit: Kazuki Takise <takise@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743756}
parent 45f3589b
...@@ -192,10 +192,6 @@ bool HomeScreenController::GoHome(int64_t display_id) { ...@@ -192,10 +192,6 @@ bool HomeScreenController::GoHome(int64_t display_id) {
} }
if (split_view_active) { if (split_view_active) {
// End split view mode.
split_view_controller->EndSplitView(
SplitViewController::EndReason::kHomeLauncherPressed);
// If overview session is active (e.g. on one side of the split view), end // If overview session is active (e.g. on one side of the split view), end
// it immediately, to prevent overview UI being visible while transitioning // it immediately, to prevent overview UI being visible while transitioning
// to home screen. // to home screen.
...@@ -203,6 +199,10 @@ bool HomeScreenController::GoHome(int64_t display_id) { ...@@ -203,6 +199,10 @@ bool HomeScreenController::GoHome(int64_t display_id) {
overview_controller->EndOverview( overview_controller->EndOverview(
OverviewSession::EnterExitOverviewType::kImmediateExit); OverviewSession::EnterExitOverviewType::kImmediateExit);
} }
// End split view mode.
split_view_controller->EndSplitView(
SplitViewController::EndReason::kHomeLauncherPressed);
} }
// If overview is active (if overview was active in split view, it exited by // If overview is active (if overview was active in split view, it exited by
......
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