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

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

Issue 177843004: Don't lookup touchscreen info for XIMasterPointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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 68de538e31976b70f9e9ca55ba07c6ec9f792c88..8176ce221a62a338bda921a10db06d913725b7fd 100644
--- a/ui/events/x/touch_factory_x11.cc
+++ b/ui/events/x/touch_factory_x11.cc
@@ -130,10 +130,9 @@ void TouchFactory::UpdateDeviceList(Display* display) {
XIAnyClassInfo* xiclassinfo = devinfo->classes[k];
if (xiclassinfo->type == XITouchClass) {
XITouchClassInfo* tci =
- reinterpret_cast<XITouchClassInfo *>(xiclassinfo);
+ reinterpret_cast<XITouchClassInfo*>(xiclassinfo);
// Only care direct touch device (such as touch screen) right now
if (tci->mode == XIDirectTouch) {
- CacheTouchscreenIds(display, devinfo->deviceid);
touch_device_lookup_[devinfo->deviceid] = true;
touch_device_list_[devinfo->deviceid] = true;
touch_device_available_ = true;
@@ -145,6 +144,21 @@ void TouchFactory::UpdateDeviceList(Display* display) {
#endif
pointer_device_lookup_[devinfo->deviceid] = true;
}
+
+#if defined(USE_XI2_MT)
+ if (devinfo->use == XIFloatingSlave || devinfo->use == XISlavePointer) {
+ for (int k = 0; k < devinfo->num_classes; ++k) {
+ XIAnyClassInfo* xiclassinfo = devinfo->classes[k];
+ if (xiclassinfo->type == XITouchClass) {
+ XITouchClassInfo* tci =
+ reinterpret_cast<XITouchClassInfo*>(xiclassinfo);
+ // Only care direct touch device (such as touch screen) right now
+ if (tci->mode == XIDirectTouch)
+ CacheTouchscreenIds(display, devinfo->deviceid);
+ }
+ }
+ }
+#endif
}
}
« 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