| Index: ui/base/x/x11_util.cc
|
| diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
|
| index 6650e31fbaaefd7459cc25c3ab946dd5584b3321..dfecc6cd8a360f4a79d21a234828ed3883b5cdd3 100644
|
| --- a/ui/base/x/x11_util.cc
|
| +++ b/ui/base/x/x11_util.cc
|
| @@ -444,7 +444,7 @@ int CoalescePendingMotionEvents(const XEvent* xev,
|
| XDisplay* display = xev->xany.display;
|
| int event_type = xev->xgeneric.evtype;
|
|
|
| - DCHECK_EQ(event_type, XI_Motion);
|
| + DCHECK(event_type == XI_Motion || event_type == XI_TouchUpdate);
|
|
|
| while (XPending(display)) {
|
| XEvent next_event;
|
| @@ -474,6 +474,7 @@ int CoalescePendingMotionEvents(const XEvent* xev,
|
| // and that no buttons or modifiers have changed.
|
| if (xievent->event == next_xievent->event &&
|
| xievent->child == next_xievent->child &&
|
| + xievent->detail == next_xievent->detail &&
|
| xievent->buttons.mask_len == next_xievent->buttons.mask_len &&
|
| (memcmp(xievent->buttons.mask,
|
| next_xievent->buttons.mask,
|
| @@ -498,7 +499,7 @@ int CoalescePendingMotionEvents(const XEvent* xev,
|
| break;
|
| }
|
|
|
| - if (num_coalesced > 0) {
|
| + if (event_type == XI_Motion && num_coalesced > 0) {
|
| base::TimeDelta delta = ui::EventTimeFromNative(last_event) -
|
| ui::EventTimeFromNative(const_cast<XEvent*>(xev));
|
| UMA_HISTOGRAM_COUNTS_10000("Event.CoalescedCount.Mouse", num_coalesced);
|
|
|