diff options
| author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-19 22:59:20 +0000 |
|---|---|---|
| committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-19 23:01:01 +0000 |
| commit | b62a17d9fb288537a9fd70eb44e562acd5c06728 (patch) | |
| tree | 551be3834c81c1431143c639aa58bbb04d77d5d9 | |
| parent | 3c643ba1c58c4e41752aaa248de08a613e29f2ea (diff) | |
| download | chromium_src-b62a17d9fb288537a9fd70eb44e562acd5c06728.zip chromium_src-b62a17d9fb288537a9fd70eb44e562acd5c06728.tar.gz chromium_src-b62a17d9fb288537a9fd70eb44e562acd5c06728.tar.bz2 | |
Call XInitThreads on host startup.
This is required in order for the host to be able to safely use X11
across multiple threads, e.g. for input-injection, screen capture and
any UX.
Review URL: https://codereview.chromium.org/487453004
Cr-Commit-Position: refs/heads/master@{#290687}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290687 0039d316-1c4b-4281-b951-d872f2087c98
| -rw-r--r-- | remoting/host/it2me/it2me_native_messaging_host_main.cc | 4 | ||||
| -rw-r--r-- | remoting/host/remoting_me2me_host.cc | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/remoting/host/it2me/it2me_native_messaging_host_main.cc b/remoting/host/it2me/it2me_native_messaging_host_main.cc index bec6b39..a8bff89 100644 --- a/remoting/host/it2me/it2me_native_messaging_host_main.cc +++ b/remoting/host/it2me/it2me_native_messaging_host_main.cc @@ -20,6 +20,7 @@ #if defined(OS_LINUX) #include <gtk/gtk.h> +#include <X11/Xlib.h> #endif // defined(OS_LINUX) #if defined(OS_MACOSX) @@ -64,6 +65,9 @@ int StartIt2MeNativeMessagingHost() { // Cannot use TOOLKIT_GTK because it is not defined when aura is enabled. #if defined(OS_LINUX) + // Required in order for us to run multiple X11 threads. + XInitThreads(); + // Required for any calls into GTK functions, such as the Disconnect and // Continue windows. Calling with NULL arguments because we don't have // any command line arguments for gtk to consume. diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index b0c8ea0..fb1d8e0 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -91,6 +91,7 @@ #if defined(OS_LINUX) #include <gtk/gtk.h> +#include <X11/Xlib.h> #include "remoting/host/audio_capturer_linux.h" #endif // defined(OS_LINUX) @@ -1417,6 +1418,9 @@ void HostProcess::OnCrash(const std::string& function_name, int HostProcessMain() { #if defined(OS_LINUX) + // Required in order for us to run multiple X11 threads. + XInitThreads(); + // Required for any calls into GTK functions, such as the Disconnect and // Continue windows, though these should not be used for the Me2Me case // (crbug.com/104377). |
