Index: components/exo/pointer.cc |
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc |
index 46fbcb109b8397317b0599b9f6c6e5d28149da82..e83dbcd48d315fc25046eda23e521cde46d2e492 100644 |
--- a/components/exo/pointer.cc |
+++ b/components/exo/pointer.cc |
@@ -247,8 +247,11 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
} |
break; |
case ui::ET_SCROLL_FLING_CANCEL: |
- if (focus_) { |
- delegate_->OnPointerScrollCancel(event->time_stamp()); |
+ if (focus_ && last_event_type_ == ui::ET_SCROLL_FLING_START) { |
+ delegate_->OnPointerScroll(event->time_stamp(), gfx::Vector2dF(), |
+ false); |
+ delegate_->OnPointerFrame(); |
+ delegate_->OnPointerScrollStop(event->time_stamp()); |
delegate_->OnPointerFrame(); |
} |
break; |
@@ -263,8 +266,10 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
break; |
} |
- if ((event->flags() & ui::EF_IS_SYNTHESIZED) == 0) |
- is_direct_input_ = (event->flags() & ui::EF_DIRECT_INPUT) != 0; |
+ if (!(event->flags() & ui::EF_IS_SYNTHESIZED)) { |
+ is_direct_input_ = event->flags() & ui::EF_DIRECT_INPUT; |
+ last_event_type_ = event->type(); |
+ } |
// Update cursor widget to reflect current focus and pointer location. |
if (focus_ && !is_direct_input_) { |