| Index: ui/events/gestures/gesture_recognizer_impl.cc
|
| diff --git a/ui/events/gestures/gesture_recognizer_impl.cc b/ui/events/gestures/gesture_recognizer_impl.cc
|
| index 4a599345c84e4dd71e9081377c4c01c584a33679..07b2d07be86021ef25411c60fa5abf9f833e100e 100644
|
| --- a/ui/events/gestures/gesture_recognizer_impl.cc
|
| +++ b/ui/events/gestures/gesture_recognizer_impl.cc
|
| @@ -78,15 +78,17 @@ GestureConsumer* GestureRecognizerImpl::GetTargetForGestureEvent(
|
| }
|
|
|
| GestureConsumer* GestureRecognizerImpl::GetTargetForLocation(
|
| - const gfx::Point& location) {
|
| + const gfx::Point& location, int source_device_id) {
|
| const GesturePoint* closest_point = NULL;
|
| int64 closest_distance_squared = 0;
|
| std::map<GestureConsumer*, GestureSequence*>::iterator i;
|
| for (i = consumer_sequence_.begin(); i != consumer_sequence_.end(); ++i) {
|
| const GesturePoint* points = i->second->points();
|
| for (int j = 0; j < GestureSequence::kMaxGesturePoints; ++j) {
|
| - if (!points[j].in_use())
|
| + if (!points[j].in_use() ||
|
| + source_device_id != points[j].source_device_id()) {
|
| continue;
|
| + }
|
| gfx::Vector2d delta = points[j].last_touch_position() - location;
|
| // Relative distance is all we need here, so LengthSquared() is
|
| // appropriate, and cheaper than Length().
|
|
|