Index: remoting/host/event_executor_linux.cc |
diff --git a/remoting/host/event_executor_linux.cc b/remoting/host/event_executor_linux.cc |
index b3176e328244fba1431966881e7e08685ef610a7..9c0326e8528335bfaa59254a8eb598ab7fc29b00 100644 |
--- a/remoting/host/event_executor_linux.cc |
+++ b/remoting/host/event_executor_linux.cc |
@@ -164,15 +164,16 @@ EventExecutorLinux::Core::Core( |
wheel_ticks_y_(0.0f), |
display_(XOpenDisplay(NULL)), |
root_window_(BadValue) { |
-#if defined(REMOTING_HOST_LINUX_CLIPBOARD) |
- if (!task_runner_->BelongsToCurrentThread()) |
- task_runner_->PostTask(FROM_HERE, base::Bind(&Core::InitClipboard, this)); |
-#endif // REMOTING_HOST_LINUX_CLIPBOARD |
} |
bool EventExecutorLinux::Core::Init() { |
CHECK(display_); |
+#if defined(REMOTING_HOST_LINUX_CLIPBOARD) |
+ if (!task_runner_->BelongsToCurrentThread()) |
+ task_runner_->PostTask(FROM_HERE, base::Bind(&Core::InitClipboard, this)); |
+#endif // REMOTING_HOST_LINUX_CLIPBOARD |
+ |
root_window_ = RootWindow(display_, DefaultScreen(display_)); |
if (root_window_ == BadValue) { |
LOG(ERROR) << "Unable to get the root window"; |