Commit 4cf85a4f authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Use window util to minimize window for window to home animation

Updates WindowTransformToHomeScreenAnimation to use

window_util::HideAndMaybeMinimizeWithoutAnimation().

Change-Id: I3cb191d72a351bf6dd700857b85d2b0775aa4bf1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1905268Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Reviewed-by: default avatarSammie Quon <sammiequon@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713892}
parent 7d50d738
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "ash/screen_util.h" #include "ash/screen_util.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/wm/window_state.h" #include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/compositor/layer.h" #include "ui/compositor/layer.h"
...@@ -65,9 +66,8 @@ WindowTransformToHomeScreenAnimation::~WindowTransformToHomeScreenAnimation() { ...@@ -65,9 +66,8 @@ WindowTransformToHomeScreenAnimation::~WindowTransformToHomeScreenAnimation() {
void WindowTransformToHomeScreenAnimation::OnImplicitAnimationsCompleted() { void WindowTransformToHomeScreenAnimation::OnImplicitAnimationsCompleted() {
// Minimize the dragged window after transform animation is completed. // Minimize the dragged window after transform animation is completed.
ScopedAnimationDisabler disable(window_); window_util::HideAndMaybeMinimizeWithoutAnimation({window_},
window_->Hide(); /*minimize=*/true);
WindowState::Get(window_)->Minimize();
// Reset its transform to identity transform and its original backdrop mode. // Reset its transform to identity transform and its original backdrop mode.
window_->layer()->SetTransform(gfx::Transform()); window_->layer()->SetTransform(gfx::Transform());
......
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