Commit 5cd1435f authored by Xiaoqian Dai's avatar Xiaoqian Dai Committed by Commit Bot

overview gesture: fix the crash when drag a window to fling.

When dragging a window quickly up into the drag-to-snap split area, the
overview windows are getting relayouted and while the animations are
still going on, fling the window to homescreen. So
OverviewItem::OnItemBoundsAnimationEnded() can be called when overview
is in shutting down process, which should not happen.

Bug: 1025267, 997885
Change-Id: Ia40f3fce589554672f2134f78ac4ddd8147d0910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918834
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715883}
parent 757ae6e2
......@@ -1083,6 +1083,11 @@ void OverviewItem::OnItemBoundsAnimationStarted() {
}
void OverviewItem::OnItemBoundsAnimationEnded() {
// Do nothing if overview is shutting down. See crbug.com/1025267 for when it
// might happen.
if (!Shell::Get()->overview_controller()->InOverviewSession())
return;
UpdateRoundedCornersAndShadow();
OnDragAnimationCompleted();
}
......
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