diff options
author | Martin Stransky <stransky@redhat.com> | 2021-01-21 13:55:58 +0100 |
---|---|---|
committer | Martin Stransky <stransky@redhat.com> | 2021-01-21 13:55:58 +0100 |
commit | ef830a0c932092d830214b2e47f91da8af7da7ad (patch) | |
tree | 04882417360309107073153a0f7cef92f543187f /pw1.patch | |
parent | Fixing package requires/provides (diff) | |
download | librewolf-fedora-ff-ef830a0c932092d830214b2e47f91da8af7da7ad.tar.gz librewolf-fedora-ff-ef830a0c932092d830214b2e47f91da8af7da7ad.tar.bz2 librewolf-fedora-ff-ef830a0c932092d830214b2e47f91da8af7da7ad.zip |
Update to 85.0
Diffstat (limited to 'pw1.patch')
-rw-r--r-- | pw1.patch | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/pw1.patch b/pw1.patch deleted file mode 100644 index 1f88545..0000000 --- a/pw1.patch +++ /dev/null @@ -1,78 +0,0 @@ - -# HG changeset patch -# User stransky <stransky@redhat.com> -# Date 1604562416 0 -# Node ID 1c126b520042591194e88618ae11a6adc1da9a08 -# Parent 6e2e4f0e4a95b0cae777dda9369a9e9bf49a51b1 -Bug 1672987 Use PipeWire when Wayland display is actually used, r=dminor - -Right now PipeWire is enabled when Wayland session is used regardless of an active Gtk backend (X11/Wayland). -Let's use PipeWire only when Wayland Gtk backend is used and disable it for X11 one to avoid possible regressions. - -Differential Revision: https://phabricator.services.mozilla.com/D94588 - -diff --git a/third_party/libwebrtc/webrtc/modules/desktop_capture/desktop_capturer.cc b/third_party/libwebrtc/webrtc/modules/desktop_capture/desktop_capturer.cc ---- a/third_party/libwebrtc/webrtc/modules/desktop_capture/desktop_capturer.cc -+++ b/third_party/libwebrtc/webrtc/modules/desktop_capture/desktop_capturer.cc -@@ -8,16 +8,21 @@ - * be found in the AUTHORS file in the root of the source tree. - */ - - #include "modules/desktop_capture/desktop_capturer.h" - - #include "modules/desktop_capture/desktop_capture_options.h" - #include "modules/desktop_capture/desktop_capturer_differ_wrapper.h" - -+#if defined(WEBRTC_USE_PIPEWIRE) || defined(USE_X11) -+#include <gtk/gtk.h> -+#include <gtk/gtkx.h> -+#endif -+ - namespace webrtc { - - DesktopCapturer::~DesktopCapturer() = default; - - void DesktopCapturer::SetSharedMemoryFactory( - std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {} - - void DesktopCapturer::SetExcludedWindow(WindowId window) {} -@@ -67,21 +72,37 @@ std::unique_ptr<DesktopCapturer> Desktop - if (capturer && options.detect_updated_region()) { - capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer))); - } - - return capturer; - } - - #if defined(WEBRTC_USE_PIPEWIRE) || defined(USE_X11) --bool DesktopCapturer::IsRunningUnderWayland() { -+// Return true if Firefox is actually running with Wayland backend. -+static bool IsWaylandDisplayUsed() { -+ const auto display = gdk_display_get_default(); -+ if (display == nullptr) { -+ // We're running in headless mode. -+ return false; -+ } -+ return !GDK_IS_X11_DISPLAY(display); -+} -+ -+// Return true if Firefox is actually running on Wayland enabled session. -+// It means some screensharing capabilities may be limited. -+static bool IsWaylandSessionUsed() { - const char* xdg_session_type = getenv("XDG_SESSION_TYPE"); - if (!xdg_session_type || strncmp(xdg_session_type, "wayland", 7) != 0) - return false; - - if (!(getenv("WAYLAND_DISPLAY"))) - return false; - - return true; - } -+ -+bool DesktopCapturer::IsRunningUnderWayland() { -+ return IsWaylandSessionUsed() ? IsWaylandDisplayUsed() : false; -+} - #endif // defined(WEBRTC_USE_PIPEWIRE) || defined(USE_X11) - - } // namespace webrtc - |