[XProto] Add SharedXDisplay::IgnoreXServerGrabs
This is necessary for Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/2327373 BUG=chromium:1066670 Change-Id: I8c5e5976d6c4737135254b9715b3aa5c885bfc8c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180773 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#31901}
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include "modules/desktop_capture/linux/shared_x_display.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XTest.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -86,4 +87,15 @@ void SharedXDisplay::ProcessPendingXEvents() {
|
||||
}
|
||||
}
|
||||
|
||||
void SharedXDisplay::IgnoreXServerGrabs() {
|
||||
int test_event_base = 0;
|
||||
int test_error_base = 0;
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
if (XTestQueryExtension(display(), &test_event_base, &test_error_base, &major,
|
||||
&minor)) {
|
||||
XTestGrabControl(display(), true);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user