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

Unified Diff: base/message_pump_x.cc

Issue 7792094: touchui: support XInput2 MT (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update according to comment #20 and #21 Created 9 years, 3 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 | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_x.cc
diff --git a/base/message_pump_x.cc b/base/message_pump_x.cc
index 8e098af95924e57269b906f21eb7975d926d3c0f..18690daeaed120dad4aeb135e9ff20b117f8d980 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 (minor < USE_XI2_MT) {
+ VLOG(1) << "XI version on server is " << major << "." << minor << ". "
+ << "But " << major << "." << USE_XI2_MT << " is required.";
Daniel Kurtz 2011/09/23 07:36:59 nit, (major,minor) is server's version, but requir
ningxin.hu 2011/09/23 14:08:31 Sorry for this mistake. Will correct it. Thanks.
+ xiopcode = -1;
+ return;
+ }
+#endif
}
} // namespace
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698