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() { |