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

Unified Diff: ui/events/x/touch_factory_x11.cc

Issue 402763002: x11: Make sure each XI2 key-event is not processed twice. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/touch_factory_x11.cc
diff --git a/ui/events/x/touch_factory_x11.cc b/ui/events/x/touch_factory_x11.cc
index 9df436c803002538e61d8ec06b8bc48699d13ed1..e6a2fe2724cad4d1d1c03e03d2e9338c7248444b 100644
--- a/ui/events/x/touch_factory_x11.cc
+++ b/ui/events/x/touch_factory_x11.cc
@@ -174,6 +174,10 @@ bool TouchFactory::ShouldProcessXI2Event(XEvent* xev) {
return !touch_events_disabled_ && IsTouchDevice(xiev->deviceid);
}
#endif
+ // Make sure only key-events from the master device are processed.
+ if (event->evtype == XI_KeyPress || event->evtype == XI_KeyRelease)
+ return xiev->deviceid == xiev->sourceid;
+
if (event->evtype != XI_ButtonPress &&
event->evtype != XI_ButtonRelease &&
event->evtype != XI_Motion)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698