Run event executor on the ui thread to remove the need to explicitly XFlush() the XTest calls.
BUG=none
TEST=Connect to a host and try moving the mouse and typing. Both inputs should be reflected correctly.
Review URL: http://codereview.chromium.org/6489031
Patch from Jamie Walch <jamiewalch@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75477 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 7b398be3d0a34cb44dff6c45a6842f4ab4c1116e
diff --git a/base/message_loop.cc b/base/message_loop.cc
index d83adcc..453172b 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -4,6 +4,11 @@
#include "base/message_loop.h"
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+#endif
+
#include <algorithm>
#include "base/compiler_specific.h"
@@ -664,6 +669,13 @@
}
#endif // defined(OS_WIN)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+Display* MessageLoopForUI::get_display()
+{
+ return gdk_x11_get_default_xdisplay();
+}
+#endif
+
#if !defined(OS_MACOSX) && !defined(OS_NACL)
void MessageLoopForUI::AddObserver(Observer* observer) {
pump_ui()->AddObserver(observer);