| Index: ui/events/event.cc
|
| diff --git a/ui/events/event.cc b/ui/events/event.cc
|
| index 5e7d8c86377a4d6a7c5546dcde02b6a76e6c71d4..18e0186a51992566d57c7218ce6f9e25a6c5371e 100644
|
| --- a/ui/events/event.cc
|
| +++ b/ui/events/event.cc
|
| @@ -110,8 +110,13 @@ bool X11EventHasNonStandardState(const base::NativeEvent& event) {
|
| #endif
|
| }
|
|
|
| -unsigned long long get_next_touch_event_id() {
|
| - static unsigned long long id = 0;
|
| +uint64 get_next_touch_event_id() {
|
| + // Set the first touch_event_id to 1 because we set id to 0 for other types
|
| + // of events.
|
| + static uint64 id = 1;
|
| + if (id==0)
|
| + id++;
|
| + DCHECK_NE(id, 0UL);
|
| return id++;
|
| }
|
|
|
| @@ -527,7 +532,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 +555,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 +576,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),
|
|
|