Index: ui/events/event.cc |
diff --git a/ui/events/event.cc b/ui/events/event.cc |
index 5e7d8c86377a4d6a7c5546dcde02b6a76e6c71d4..c5ccb8d25ff262dfc63a8a6889aa1cf6bd191938 100644 |
--- a/ui/events/event.cc |
+++ b/ui/events/event.cc |
@@ -111,7 +111,9 @@ bool X11EventHasNonStandardState(const base::NativeEvent& event) { |
} |
unsigned long long get_next_touch_event_id() { |
- static unsigned long long id = 0; |
+ // Set the first touch_event_id to 1 because we set id to 0 for other types |
+ // of events. |
+ static unsigned long long id = 1; |
return id++; |
tdresser
2015/03/16 12:24:12
We should check if id has wrapped around, and set
lanwei
2015/03/16 19:06:07
Done.
|
} |
@@ -527,7 +529,7 @@ void MouseWheelEvent::UpdateForRootTransform( |
TouchEvent::TouchEvent(const base::NativeEvent& native_event) |
: LocatedEvent(native_event), |
touch_id_(GetTouchId(native_event)), |
- unique_event_id_(get_next_touch_event_id()), |
+ unique_touch_event_id_(get_next_touch_event_id()), |
radius_x_(GetTouchRadiusX(native_event)), |
radius_y_(GetTouchRadiusY(native_event)), |
rotation_angle_(GetTouchAngle(native_event)), |
@@ -550,7 +552,7 @@ TouchEvent::TouchEvent(EventType type, |
base::TimeDelta time_stamp) |
: LocatedEvent(type, location, location, time_stamp, 0), |
touch_id_(touch_id), |
- unique_event_id_(get_next_touch_event_id()), |
+ unique_touch_event_id_(get_next_touch_event_id()), |
radius_x_(0.0f), |
radius_y_(0.0f), |
rotation_angle_(0.0f), |
@@ -571,7 +573,7 @@ TouchEvent::TouchEvent(EventType type, |
float force) |
: LocatedEvent(type, location, location, time_stamp, flags), |
touch_id_(touch_id), |
- unique_event_id_(get_next_touch_event_id()), |
+ unique_touch_event_id_(get_next_touch_event_id()), |
radius_x_(radius_x), |
radius_y_(radius_y), |
rotation_angle_(angle), |