Commit d9959f5d authored by Matthew Mourgos's avatar Matthew Mourgos Committed by Commit Bot

cros: Fix tablet shelf jank when animating from overview to home

During the overview -> home animation ShelfConfig::is_in_app() was
momentarily returning true. This occurred during animation because
is_app_list_visible_ was false and overview->InOverviewSession() was
false.

OnOverviewModeEnded() can no longer be used since is_in_app() will
return the wrong value when overview mode has ended and still has a
running end animation.



Bug: 1011994
Change-Id: Ie3e9bd362979cd573c1261a5b7e23bd30866d18f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849172Reviewed-by: default avatarSammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Commit-Queue: Matthew Mourgos <mmourgos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704326}
parent abf77a96
......@@ -58,7 +58,7 @@ class ASH_EXPORT ShelfConfig : public TabletModeObserver,
// OverviewObserver:
void OnOverviewModeStartingAnimationComplete(bool canceled) override;
void OnOverviewModeEnded() override;
void OnOverviewModeEndingAnimationComplete(bool canceled) override;
// Size of the shelf when visible (height when the shelf is horizontal and
// width when the shelf is vertical).
......
......@@ -126,7 +126,7 @@ void ShelfConfig::OnOverviewModeStartingAnimationComplete(bool canceled) {
OnShelfConfigUpdated();
}
void ShelfConfig::OnOverviewModeEnded() {
void ShelfConfig::OnOverviewModeEndingAnimationComplete(bool canceled) {
OnShelfConfigUpdated();
}
......@@ -212,6 +212,7 @@ bool ShelfConfig::is_in_app() const {
if (!overview || !session)
return false;
return !overview->InOverviewSession() &&
!overview->IsCompletingShutdownAnimations() &&
session->GetSessionState() == session_manager::SessionState::ACTIVE &&
!is_app_list_visible_;
}
......
......@@ -231,7 +231,7 @@ bool OverviewController::IsInStartAnimation() {
return !start_animations_.empty();
}
bool OverviewController::IsCompletingShutdownAnimations() {
bool OverviewController::IsCompletingShutdownAnimations() const {
return !delayed_animations_.empty();
}
......
......@@ -60,7 +60,7 @@ class ASH_EXPORT OverviewController : public OverviewDelegate,
// Returns true if overview has been shutdown, but is still animating to the
// end state ui.
bool IsCompletingShutdownAnimations();
bool IsCompletingShutdownAnimations() const;
// Pause or unpause the occlusion tracker. Resets the unpause delay if we were
// already in the process of unpausing.
......
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