summaryrefslogtreecommitdiffstats
path: root/remoting/host/input_injector_x11.cc
diff options
context:
space:
mode:
authorjamiewalch <jamiewalch@chromium.org>2015-12-17 12:08:53 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-17 20:09:57 +0000
commiteef43622fa091ff4b95649c4df5f840c4ee0f44b (patch)
tree12d710f5c532f8db6ee56355a09c088af20355ac /remoting/host/input_injector_x11.cc
parentf6b595d002ba4729f2af349b689573ac5afa6e99 (diff)
downloadchromium_src-eef43622fa091ff4b95649c4df5f840c4ee0f44b.zip
chromium_src-eef43622fa091ff4b95649c4df5f840c4ee0f44b.tar.gz
chromium_src-eef43622fa091ff4b95649c4df5f840c4ee0f44b.tar.bz2
Ignore grabs for the input and capture X Server connections.
This means that window managers that call XGrabServer, for example to implement outline window resize/drag, don't deadlock the host. BUG=172907 Review URL: https://codereview.chromium.org/1537463002 Cr-Commit-Position: refs/heads/master@{#365869}
Diffstat (limited to 'remoting/host/input_injector_x11.cc')
-rw-r--r--remoting/host/input_injector_x11.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/remoting/host/input_injector_x11.cc b/remoting/host/input_injector_x11.cc
index fc0c712..1a93c20 100644
--- a/remoting/host/input_injector_x11.cc
+++ b/remoting/host/input_injector_x11.cc
@@ -24,6 +24,7 @@
#endif
#include "remoting/host/clipboard.h"
#include "remoting/host/linux/unicode_to_keysym.h"
+#include "remoting/host/linux/x11_util.h"
#include "remoting/proto/internal.pb.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "ui/events/keycodes/dom/dom_code.h"
@@ -180,9 +181,6 @@ class InputInjectorX11 : public InputInjector {
Display* display_;
Window root_window_;
- int test_event_base_;
- int test_error_base_;
-
// Number of buttons we support.
// Left, Right, Middle, VScroll Up/Down, HScroll Left/Right.
static const int kNumPointerButtons = 7;
@@ -266,11 +264,7 @@ bool InputInjectorX11::Core::Init() {
return false;
}
- // TODO(ajwong): Do we want to check the major/minor version at all for XTest?
- int major = 0;
- int minor = 0;
- if (!XTestQueryExtension(display_, &test_event_base_, &test_error_base_,
- &major, &minor)) {
+ if (!IgnoreXServerGrabs(display_, true)) {
LOG(ERROR) << "Server does not support XTest.";
return false;
}