diff --git a/webrtc/modules/desktop_capture/screen_drawer_linux.cc b/webrtc/modules/desktop_capture/screen_drawer_linux.cc index 4f96b7e92c..c78e6843fe 100644 --- a/webrtc/modules/desktop_capture/screen_drawer_linux.cc +++ b/webrtc/modules/desktop_capture/screen_drawer_linux.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include diff --git a/webrtc/modules/desktop_capture/x11/shared_x_display.cc b/webrtc/modules/desktop_capture/x11/shared_x_display.cc index 3eb5eb10a9..c5b9bd914c 100644 --- a/webrtc/modules/desktop_capture/x11/shared_x_display.cc +++ b/webrtc/modules/desktop_capture/x11/shared_x_display.cc @@ -10,19 +10,22 @@ #include "webrtc/modules/desktop_capture/x11/shared_x_display.h" +#include + #include +#include "webrtc/base/checks.h" #include "webrtc/system_wrappers/include/logging.h" namespace webrtc { SharedXDisplay::SharedXDisplay(Display* display) : display_(display) { - assert(display_); + RTC_DCHECK(display_); } SharedXDisplay::~SharedXDisplay() { - assert(event_handlers_.empty()); + RTC_DCHECK(event_handlers_.empty()); XCloseDisplay(display_); } diff --git a/webrtc/modules/desktop_capture/x11/shared_x_display.h b/webrtc/modules/desktop_capture/x11/shared_x_display.h index 6cade2decc..648f67a51f 100644 --- a/webrtc/modules/desktop_capture/x11/shared_x_display.h +++ b/webrtc/modules/desktop_capture/x11/shared_x_display.h @@ -14,15 +14,17 @@ #include #include -#include -#include - #include #include "webrtc/base/constructormagic.h" #include "webrtc/base/scoped_ref_ptr.h" #include "webrtc/system_wrappers/include/atomic32.h" +// Including Xlib.h will involve evil defines (Bool, Status, True, False), which +// easily conflict with other headers. +typedef struct _XDisplay Display; +typedef union _XEvent XEvent; + namespace webrtc { // A ref-counted object to store XDisplay connection.