From c61e780dc832ee3c6d762fd6aa1d7d848a40057a Mon Sep 17 00:00:00 2001 From: Andrey Logvin Date: Tue, 11 Aug 2020 08:24:29 +0000 Subject: [PATCH] Revert "[XProto] Add SharedXDisplay::IgnoreXServerGrabs" This reverts commit cf8ea9c25903edb2c907a3cf18e1d31e0196e2e9. Reason for revert: Breaks an upstream project. Original change's description: > [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 > Commit-Queue: Thomas Anderson > Cr-Commit-Position: refs/heads/master@{#31901} TBR=jamiewalch@chromium.org,sergeyu@chromium.org,thomasanderson@chromium.org Change-Id: I666996581e78e783d8028c601559f0c5871a7145 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1066670 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181362 Reviewed-by: Andrey Logvin Commit-Queue: Andrey Logvin Cr-Commit-Position: refs/heads/master@{#31903} --- modules/desktop_capture/BUILD.gn | 1 - modules/desktop_capture/linux/shared_x_display.cc | 12 ------------ modules/desktop_capture/linux/shared_x_display.h | 5 +---- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index b40b7430f6..eb26f5c7bb 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -400,7 +400,6 @@ rtc_library("desktop_capture_generic") { "Xfixes", "Xrender", "Xrandr", - "Xtst", ] } diff --git a/modules/desktop_capture/linux/shared_x_display.cc b/modules/desktop_capture/linux/shared_x_display.cc index f0b35f62d3..c475db6e78 100644 --- a/modules/desktop_capture/linux/shared_x_display.cc +++ b/modules/desktop_capture/linux/shared_x_display.cc @@ -11,7 +11,6 @@ #include "modules/desktop_capture/linux/shared_x_display.h" #include -#include #include @@ -87,15 +86,4 @@ 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 diff --git a/modules/desktop_capture/linux/shared_x_display.h b/modules/desktop_capture/linux/shared_x_display.h index 64c498c134..98b6101904 100644 --- a/modules/desktop_capture/linux/shared_x_display.h +++ b/modules/desktop_capture/linux/shared_x_display.h @@ -18,7 +18,6 @@ #include "api/ref_counted_base.h" #include "api/scoped_refptr.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/system/rtc_export.h" // Including Xlib.h will involve evil defines (Bool, Status, True, False), which // easily conflict with other headers. @@ -28,7 +27,7 @@ typedef union _XEvent XEvent; namespace webrtc { // A ref-counted object to store XDisplay connection. -class RTC_EXPORT SharedXDisplay : public rtc::RefCountedBase { +class SharedXDisplay : public rtc::RefCountedBase { public: class XEventHandler { public: @@ -63,8 +62,6 @@ class RTC_EXPORT SharedXDisplay : public rtc::RefCountedBase { // Processes pending XEvents, calling corresponding event handlers. void ProcessPendingXEvents(); - void IgnoreXServerGrabs(); - protected: ~SharedXDisplay() override;