Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: ui/base/x/x11_util.cc

Issue 89413002: linux aura: Support touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_root_window_host_x11.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_root_window_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698