summaryrefslogtreecommitdiffstats
path: root/ui/views/widget/root_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views/widget/root_view.cc')
-rw-r--r--ui/views/widget/root_view.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index 12c2d12..2a71020 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -288,6 +288,17 @@ void RootView::DispatchGestureEvent(ui::GestureEvent* event) {
return;
}
+ // If there was no handler for a SCROLL_BEGIN event, then subsequent scroll
+ // events are not dispatched to any views.
+ switch (event->type()) {
+ case ui::ET_GESTURE_SCROLL_UPDATE:
+ case ui::ET_GESTURE_SCROLL_END:
+ case ui::ET_SCROLL_FLING_START:
+ return;
+ default:
+ break;
+ }
+
// Walk up the tree until we find a view that wants the gesture event.
for (gesture_handler_ = GetEventHandlerForPoint(event->location());
gesture_handler_ && (gesture_handler_ != this);