Reland "[XProto] Add SharedXDisplay::IgnoreXServerGrabs"

This is a reland of cf8ea9c25903edb2c907a3cf18e1d31e0196e2e9

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 <jamiewalch@chromium.org>
> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#31901}

TBR=jamiewalch@chromium.org, thomasanderson@chromium.org

Bug: chromium:1066670
Change-Id: I8ea0a2ff5445524648243635724014ff5337767c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31917}
This commit is contained in:
Tom Anderson
2020-08-03 12:04:57 -07:00
committed by Commit Bot
parent 3d31694f1f
commit 17a1654670
3 changed files with 17 additions and 1 deletions

View File

@ -18,6 +18,7 @@
#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.
@ -27,7 +28,7 @@ typedef union _XEvent XEvent;
namespace webrtc {
// A ref-counted object to store XDisplay connection.
class SharedXDisplay : public rtc::RefCountedBase {
class RTC_EXPORT SharedXDisplay : public rtc::RefCountedBase {
public:
class XEventHandler {
public:
@ -62,6 +63,8 @@ class SharedXDisplay : public rtc::RefCountedBase {
// Processes pending XEvents, calling corresponding event handlers.
void ProcessPendingXEvents();
void IgnoreXServerGrabs();
protected:
~SharedXDisplay() override;