| Index: ui/views/widget/root_view.cc
|
| diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
|
| index 2e799a8f2324b16b68e29a426cbc8beb5646d2c9..ac6c38c77a1ae6c7d911bf23cd7d0ceb4c75d16d 100644
|
| --- a/ui/views/widget/root_view.cc
|
| +++ b/ui/views/widget/root_view.cc
|
| @@ -496,10 +496,16 @@ ui::GestureStatus RootView::OnGestureEvent(const GestureEvent& event) {
|
| return ui::GESTURE_STATUS_UNKNOWN;
|
| }
|
|
|
| + gfx::Rect touch_rect(event.details().bounding_box());
|
| + gfx::Point touch_rect_location(touch_rect.x(), touch_rect.y());
|
| + ConvertPointToScreen(this, &touch_rect_location);
|
| + touch_rect.set_origin(touch_rect_location);
|
| + View *v = GetEventHandlerForRect(touch_rect);
|
| +
|
| // Walk up the tree until we find a view that wants the gesture event.
|
| - for (gesture_handler_ = GetEventHandlerForPoint(e.location());
|
| - gesture_handler_ && (gesture_handler_ != this);
|
| - gesture_handler_ = gesture_handler_->parent()) {
|
| + for (gesture_handler_ = v ? v : GetEventHandlerForPoint(e.location());
|
| + gesture_handler_ && (gesture_handler_ != this);
|
| + gesture_handler_ = gesture_handler_->parent()) {
|
| if (!gesture_handler_->enabled()) {
|
| // Disabled views eat events but are treated as not handled.
|
| return ui::GESTURE_STATUS_UNKNOWN;
|
|
|