From b17745973f39275683b6d90d62d386ac23e1b4d2 Mon Sep 17 00:00:00 2001 From: Lambros Lambrou Date: Wed, 11 May 2022 14:45:14 -0700 Subject: [PATCH] Update return value of ScreenCapturerX11::HandleXEvent(). HandleXEvent() returns true to indicate the event is consumed and should not be passed to other registered handlers of the same event-type. In ScreenCapturerX11, this makes sense for XDamage events because they are scoped to the object's |damage_handle_|. But RRScreenChangeNotify and ConfigureNotify events are scoped to the root window, so this CL changes the return value to false for these events. This allows other handlers (including other screen-capturer instances) to see these events. Bug: webrtc:14060 Change-Id: Id18917b0b62d125da08578e08df9648062500cad Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262142 Commit-Queue: Alexander Cooper Auto-Submit: Lambros Lambrou Reviewed-by: Alexander Cooper Cr-Commit-Position: refs/heads/main@{#36858} --- modules/desktop_capture/linux/x11/screen_capturer_x11.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc index 2de387578e..3cc256bdbd 100644 --- a/modules/desktop_capture/linux/x11/screen_capturer_x11.cc +++ b/modules/desktop_capture/linux/x11/screen_capturer_x11.cc @@ -350,10 +350,10 @@ bool ScreenCapturerX11::HandleXEvent(const XEvent& event) { XRRUpdateConfiguration(const_cast(&event)); UpdateMonitors(); RTC_LOG(LS_INFO) << "XRandR screen change event received."; - return true; + return false; } else if (event.type == ConfigureNotify) { ScreenConfigurationChanged(); - return true; + return false; } return false; }