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

Unified Diff: trunk/src/base/message_loop/message_pump_x11.cc

Issue 63443002: Revert 233414 "x11: Move XInput2 availability information out of..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/base/message_loop/message_pump_x11.h ('k') | trunk/src/ui/aura/root_window_host_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/message_loop/message_pump_x11.cc
===================================================================
--- trunk/src/base/message_loop/message_pump_x11.cc (revision 233415)
+++ trunk/src/base/message_loop/message_pump_x11.cc (working copy)
@@ -53,7 +53,7 @@
Display* g_xdisplay = NULL;
int g_xinput_opcode = -1;
-bool InitializeXInput2() {
+bool InitializeXInput2Internal() {
Display* display = MessagePumpX11::GetDefaultXDisplay();
if (!display)
return false;
@@ -97,6 +97,11 @@
return target;
}
+bool InitializeXInput2() {
+ static bool xinput2_supported = InitializeXInput2Internal();
+ return xinput2_supported;
+}
+
bool InitializeXkb() {
Display* display = MessagePumpX11::GetDefaultXDisplay();
if (!display)
@@ -148,6 +153,11 @@
return g_xdisplay;
}
+// static
+bool MessagePumpX11::HasXInput2() {
+ return InitializeXInput2();
+}
+
#if defined(TOOLKIT_GTK)
// static
MessagePumpX11* MessagePumpX11::Current() {
« no previous file with comments | « trunk/src/base/message_loop/message_pump_x11.h ('k') | trunk/src/ui/aura/root_window_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698