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

Unified Diff: ui/events/devices/x11/touch_factory_x11.cc

Issue 968343002: Make the native select menu work on Linux touch screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 5 years, 10 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 | ui/views/widget/desktop_aura/x11_pointer_grab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/x11_pointer_grab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698