Index: ui/events/devices/x11/touch_factory_x11.cc |
diff --git a/ui/events/devices/x11/touch_factory_x11.cc b/ui/events/devices/x11/touch_factory_x11.cc |
index 4201fa04bf3bdc35136b8400ab443280a7210df9..0185ede4ea10f13e1e4c0c41fefa46d9f81460ac 100644 |
--- a/ui/events/devices/x11/touch_factory_x11.cc |
+++ b/ui/events/devices/x11/touch_factory_x11.cc |
@@ -160,7 +160,11 @@ bool TouchFactory::ShouldProcessXI2Event(XEvent* xev) { |
if (event->evtype == XI_TouchBegin || |
event->evtype == XI_TouchUpdate || |
event->evtype == XI_TouchEnd) { |
- return !touch_events_disabled_ && IsTouchDevice(xiev->deviceid); |
+ return !touch_events_disabled_ && |
+ IsTouchDevice(xiev->deviceid) && |
+ // For Linux, both master and attached-slaved devices send the same |
+ // touch events, we will use the ones from attached-slave device. |
+ (xiev->sourceid == xiev->deviceid); |
sadrul
2015/03/05 09:38:52
We actually want to process only the event that is
lanwei
2015/03/07 04:22:50
check if the device is attached-slave by looking a
|
} |
// Make sure only key-events from the virtual core keyboard are processed. |