Index: trunk/src/ui/events/x/device_data_manager.cc |
=================================================================== |
--- trunk/src/ui/events/x/device_data_manager.cc (revision 233415) |
+++ trunk/src/ui/events/x/device_data_manager.cc (working copy) |
@@ -112,10 +112,8 @@ |
DeviceDataManager::DeviceDataManager() |
: natural_scroll_enabled_(false), |
- xi_opcode_(-1), |
atom_cache_(gfx::GetXDisplay(), kCachedAtoms), |
button_map_count_(0) { |
- CHECK(gfx::GetXDisplay()); |
InitializeXInputInternal(); |
// Make sure the sizes of enum and kCachedAtoms are aligned. |
@@ -136,6 +134,7 @@ |
VLOG(1) << "X Input extension not available: error=" << error; |
return false; |
} |
+ xi_opcode_ = opcode; |
// Check the XInput version. |
#if defined(USE_XI2_MT) |
@@ -147,17 +146,7 @@ |
VLOG(1) << "XInput2 not supported in the server."; |
return false; |
} |
-#if defined(USE_XI2_MT) |
- if (major < 2 || (major == 2 && minor < USE_XI2_MT)) { |
- DVLOG(1) << "XI version on server is " << major << "." << minor << ". " |
- << "But 2." << USE_XI2_MT << " is required."; |
- return false; |
- } |
-#endif |
- xi_opcode_ = opcode; |
- CHECK_NE(-1, xi_opcode_); |
- |
// Possible XI event types for XIDeviceEvent. See the XI2 protocol |
// specification. |
xi_device_event_types_[XI_KeyPress] = true; |
@@ -174,10 +163,6 @@ |
return true; |
} |
-bool DeviceDataManager::IsXInput2Available() const { |
- return xi_opcode_ != -1; |
-} |
- |
float DeviceDataManager::GetNaturalScrollFactor(int sourceid) const { |
// Natural scroll is touchpad-only. |
if (sourceid >= kMaxDeviceNum || !touchpads_[sourceid]) |
@@ -207,9 +192,6 @@ |
if (dev_list[i].type == xi_touchpad) |
touchpads_[dev_list[i].id] = true; |
- if (!IsXInput2Available()) |
- return; |
- |
// Update the structs with new valuator information |
XIDeviceList info_list = |
ui::DeviceListCacheX::GetInstance()->GetXI2DeviceList(display); |