Index: base/message_pump_x.cc |
diff --git a/base/message_pump_x.cc b/base/message_pump_x.cc |
index 8e098af95924e57269b906f21eb7975d926d3c0f..1b7e4f154bebd661fa8dd6ee1b86337d648ffdf3 100644 |
--- a/base/message_pump_x.cc |
+++ b/base/message_pump_x.cc |
@@ -70,12 +70,25 @@ void InitializeXInput2(void) { |
return; |
} |
+#if defined(USE_XI2_MT) |
+ // USE_XI2_MT also defines the required XI2 minor minimum version. |
+ int major = 2, minor = USE_XI2_MT; |
+#else |
int major = 2, minor = 0; |
+#endif |
if (XIQueryVersion(display, &major, &minor) == BadRequest) { |
VLOG(1) << "XInput2 not supported in the server."; |
xiopcode = -1; |
return; |
} |
+#if defined(USE_XI2_MT) |
+ if (major < 2 || minor < USE_XI2_MT) { |
Daniel Kurtz
2011/09/24 00:29:10
Sorry, this is my fault. This isn't quite right.
|
+ VLOG(1) << "XI version on server is " << major << "." << minor << ". " |
+ << "But 2." << USE_XI2_MT << " is required."; |
+ xiopcode = -1; |
+ return; |
+ } |
+#endif |
} |
} // namespace |