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

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

Issue 49383011: Build fix linux aura without USE_XI2_MT. (Closed) Base URL: https://git.chromium.org/chromium/src.git@ime
Patch Set: Created 7 years, 2 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 b3cd4dd0617d644c6bcf5849d8a257fe452dd4e9..59fc8f162c829241cf1f8d9084b1557a790b6897 100644
--- a/ui/events/x/touch_factory_x11.cc
+++ b/ui/events/x/touch_factory_x11.cc
@@ -91,14 +91,12 @@ void TouchFactory::UpdateDeviceList(Display* display) {
// With XI2.1 or older, we allow only single touch devices.
XDeviceList dev_list =
DeviceListCacheX::GetInstance()->GetXDeviceList(display);
+ Atom xi_touchscreen = XInternAtom(display, XI_TOUCHSCREEN, false);
for (int i = 0; i < dev_list.count; i++) {
- if (dev_list[i].type) {
- XScopedString devtype(XGetAtomName(display, dev_list[i].type));
- if (devtype.string() && !strcmp(devtype.string(), XI_TOUCHSCREEN)) {
- touch_device_lookup_[dev_list[i].id] = true;
- touch_device_list_[dev_list[i].id] = false;
- touch_device_available_ = true;
- }
+ if (dev_list[i].type == xi_touchscreen) {
+ touch_device_lookup_[dev_list[i].id] = true;
+ touch_device_list_[dev_list[i].id] = false;
+ touch_device_available_ = true;
}
}
#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