tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 4ee93eb431d0d47049c0c72f4941d3a6571774e8
parent fe7a5ea5d277d2ba0736d7a64a0e358319fa78f1
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon,  1 Dec 2025 23:36:54 -0700

Bug 2000941 - Vendor libwebrtc from 412ea40eeb

Upstream commit: https://webrtc.googlesource.com/src/+/412ea40eeb9971c6ca11e8f8789ad4d42e195710
    Add secondary windows option for Windows.Graphics.Capture window capture

    Adds off by default option to include secondary windows, which can
    capture more application content like tool tips and popups during window capture.

    Bug: webrtc:41481071
    Change-Id: If99e871429dbde7a84971f4ad3b75c79b9780ee1
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/409642
    Reviewed-by: Alexander Cooper <alcooper@chromium.org>
    Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
    Commit-Queue: Steve Becker <stevebe@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#45715}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h | 15+++++++++++++++
Mthird_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc | 12++++++++++++
Mthird_party/libwebrtc/moz-patch-stack/s0080.patch | 6+++---
4 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T06:34:00.562137+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T06:36:40.952005+00:00. # base of lastest vendoring -735c8bae14 +412ea40eeb diff --git a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h @@ -213,6 +213,20 @@ class RTC_EXPORT DesktopCaptureOptions { // The flag has no effect if the allow_wgc_capturer flag is false. bool wgc_require_border() const { return wgc_require_border_; } void set_wgc_require_border(bool require) { wgc_require_border_ = require; } + + // For window capture, set to true to include more application content like + // tool tips and drop downs. From the Microsoft developer docs: + // + // "Secondary Windows are considered to be windows that have either the + // WS_POPUP or WS_EX_TOOLWINDOW styles that intersect the main window. The + // windows are drawn into the texture the app receives and are clipped if they + // go outside the bounds of the main top level window." + bool wgc_include_secondary_windows() const { + return wgc_include_secondary_windows_; + } + void set_wgc_include_secondary_windows(bool include) { + wgc_include_secondary_windows_ = include; + } #endif // defined(RTC_ENABLE_WIN_WGC) #endif // defined(WEBRTC_WIN) @@ -270,6 +284,7 @@ class RTC_EXPORT DesktopCaptureOptions { bool allow_wgc_capturer_fallback_ = false; bool allow_wgc_zero_hertz_ = false; bool wgc_require_border_ = false; + bool wgc_include_secondary_windows_ = false; #endif #endif #if defined(WEBRTC_USE_X11) diff --git a/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc b/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc @@ -276,6 +276,18 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { } #endif + // Windows 11 24H2 (10.0.26100.0) added + // `IGraphicsCaptureSession6::put_IncludeSecondaryWindows()`. See + // `wgc_include_secondary_windows()` in + // /modules/desktop_capture/desktop_capture_options.h for more details. + ComPtr<ABI::Windows::Graphics::Capture::IGraphicsCaptureSession6> session6; + if (SUCCEEDED(session_->QueryInterface( + ABI::Windows::Graphics::Capture::IID_IGraphicsCaptureSession6, + &session6))) { + session6->put_IncludeSecondaryWindows( + options.wgc_include_secondary_windows()); + } + allow_zero_hertz_ = options.allow_wgc_zero_hertz(); hr = session_->StartCapture(); diff --git a/third_party/libwebrtc/moz-patch-stack/s0080.patch b/third_party/libwebrtc/moz-patch-stack/s0080.patch @@ -11,7 +11,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0aac94794aad2ddb6 1 file changed, 6 insertions(+) diff --git a/modules/desktop_capture/win/wgc_capture_session.cc b/modules/desktop_capture/win/wgc_capture_session.cc -index 01ec96b6c1..05c5bb4381 100644 +index 3969654bce..3037d471cc 100644 --- a/modules/desktop_capture/win/wgc_capture_session.cc +++ b/modules/desktop_capture/win/wgc_capture_session.cc @@ -258,6 +258,11 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { @@ -32,5 +32,5 @@ index 01ec96b6c1..05c5bb4381 100644 } +#endif - allow_zero_hertz_ = options.allow_wgc_zero_hertz(); - + // Windows 11 24H2 (10.0.26100.0) added + // `IGraphicsCaptureSession6::put_IncludeSecondaryWindows()`. See