Commit f217e8a7 authored by Xiaoqian Dai's avatar Xiaoqian Dai Committed by Commit Bot

overview: End window drag for fling event.

For fling event, we also should do proper drag ending if splitview mode is
active at the moment. Otherwise, the splitview divider bar won't be able to
place on top properly.

Bug: 885261
Change-Id: I992c2502090c2f4d6fd9e4f0401ca172f9041823
Reviewed-on: https://chromium-review.googlesource.com/1231893Reviewed-by: default avatarMin Chen <minch@chromium.org>
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592213}
parent 013cea99
......@@ -193,6 +193,11 @@ void OverviewWindowDragController::Fling(const gfx::Point& location_in_screen,
if (current_drag_behavior_ == DragBehavior::kDragToClose ||
current_drag_behavior_ == DragBehavior::kUndefined) {
if (std::abs(velocity_y) > kFlingToCloseVelocityThreshold) {
if (SplitViewController::ShouldAllowSplitView()) {
split_view_controller_->OnWindowDragEnded(
item_->GetWindow(), snap_position_, location_in_screen);
}
item_->AnimateAndCloseWindow(
(location_in_screen - initial_event_location_).y() < 0);
did_move_ = false;
......
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