Chromium Code Reviews| Index: ui/app_list/views/app_list_view.cc |
| diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc |
| index 128b018f2dcde90c6ba3207842482f48d98945ee..a27d0a4fef8874a9c938935a85a40c78caedbfb2 100644 |
| --- a/ui/app_list/views/app_list_view.cc |
| +++ b/ui/app_list/views/app_list_view.cc |
| @@ -521,7 +521,7 @@ void AppListView::EndDrag(const gfx::Point& location) { |
| // fling. |
| int const new_y_position = location.y() - initial_drag_point_.y() + |
| fullscreen_widget_->GetWindowBoundsInScreen().y(); |
| - if (std::abs(last_fling_velocity_) > kAppListDragVelocityThreshold) { |
| + if (std::abs(last_fling_velocity_) >= kAppListDragVelocityThreshold) { |
| // If the user releases drag with velocity over the threshold, snap to |
| // the next state, ignoring the drag release position. |
| @@ -724,12 +724,13 @@ void AppListView::OnGestureEvent(ui::GestureEvent* event) { |
| return; |
| switch (event->type()) { |
| + case ui::ET_SCROLL_FLING_START: |
| case ui::ET_GESTURE_SCROLL_BEGIN: |
| StartDrag(event->location()); |
| event->SetHandled(); |
| break; |
| case ui::ET_GESTURE_SCROLL_UPDATE: |
| - last_fling_velocity_ = event->details().velocity_y(); |
| + last_fling_velocity_ = event->details().scroll_y(); |
| UpdateDrag(event->location()); |
| event->SetHandled(); |
| break; |
| @@ -855,6 +856,7 @@ void AppListView::SetState(AppListState new_state) { |
| new_widget_bounds.set_y(0); |
| break; |
| case CLOSED: |
| + GetWidget()->Close(); |
|
xiyuan
2017/06/21 18:16:18
Why do we need to do this? delegate_->Dismiss() do
newcomer
2017/06/21 20:39:42
I changed it so I could test it more easily. I agr
|
| app_list_main_view_->Close(); |
| delegate_->Dismiss(); |
| break; |