[arch-commits] Commit in firefox/trunk (2 files)

Jan Steffens heftig at gemini.archlinux.org
Sun Sep 19 16:24:27 UTC 2021


    Date: Sunday, September 19, 2021 @ 16:24:27
  Author: heftig
Revision: 424377

92.0-2: Fix screen sharing with xdg-desktop-portal 1.10

Added:
  firefox/trunk/0002-Bug-1731495-Don-t-typecheck-the-pipewire-session_han.patch
Modified:
  firefox/trunk/PKGBUILD

-----------------------------------------------------------------+
 0002-Bug-1731495-Don-t-typecheck-the-pipewire-session_han.patch |   40 ++++++++++
 PKGBUILD                                                        |    7 +
 2 files changed, 46 insertions(+), 1 deletion(-)

Added: 0002-Bug-1731495-Don-t-typecheck-the-pipewire-session_han.patch
===================================================================
--- 0002-Bug-1731495-Don-t-typecheck-the-pipewire-session_han.patch	                        (rev 0)
+++ 0002-Bug-1731495-Don-t-typecheck-the-pipewire-session_han.patch	2021-09-19 16:24:27 UTC (rev 424377)
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Sun, 19 Sep 2021 17:26:30 +0200
+Subject: [PATCH] Bug 1731495 - Don't typecheck the pipewire session_handle.
+ r?rmader
+
+Since xdg-desktop-portal 1.10.0, the type is "o" (an object path string)
+instead of "s" (a normal string). g_variant_lookup fails if the type
+doesn't match exactly, even though both are strings.
+
+Use g_variant_lookup_value to get the field value, telling it not to
+typecheck. Use g_variant_dup_string to extract the string, which doesn't
+care about the exact type, so this code should work with all versions of
+xdg-desktop-portal.
+
+Following a similar fix to OBS, see
+https://github.com/obsproject/obs-studio/commit/ef0540c0d7df.
+---
+ .../desktop_capture/linux/base_capturer_pipewire.cc       | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+index 236fc09c8a96b..2c4489fb62c6c 100644
+--- a/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
++++ b/third_party/libwebrtc/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+@@ -589,8 +589,12 @@ void BaseCapturerPipeWire::OnSessionRequestResponseSignal(
+   guint32 portal_response;
+   GVariant* response_data;
+   g_variant_get(parameters, "(u at a{sv})", &portal_response, &response_data);
+-  g_variant_lookup(response_data, "session_handle", "s",
+-                   &that->session_handle_);
++
++  GVariant* session_handle =
++      g_variant_lookup_value(response_data, "session_handle", NULL);
++  that->session_handle_ = g_variant_dup_string(session_handle, NULL);
++
++  g_variant_unref(session_handle);
+   g_variant_unref(response_data);
+ 
+   if (!that->session_handle_ || portal_response) {

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-09-19 14:57:52 UTC (rev 424376)
+++ PKGBUILD	2021-09-19 16:24:27 UTC (rev 424377)
@@ -4,7 +4,7 @@
 
 pkgname=firefox
 pkgver=92.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Standalone web browser from mozilla.org"
 arch=(x86_64)
 license=(MPL GPL LGPL)
@@ -22,10 +22,12 @@
 options=(!emptydirs !makeflags !strip)
 source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz{,.asc}
         0001-Use-remoting-name-for-GDK-application-names.patch
+        0002-Bug-1731495-Don-t-typecheck-the-pipewire-session_han.patch
         $pkgname.desktop identity-icons-brand.svg)
 sha256sums=('299a472373021cc9194449c9f4bb962d5f74ef05e8af0448c589761ea34fbc84'
             'SKIP'
             'd7c7a65c4b7ec9ea40df129724ffb369d3f775b0514e3c267c52eec6d284b5e6'
+            '8f313d96c845723f54996d660a201d747dfa8da791f19a827aba55cb81261e38'
             '298eae9de76ec53182f38d5c549d0379569916eebf62149f9d7f4a7edef36abf'
             'a9b8b4a0a1f4a7b4af77d5fc70c2686d624038909263c795ecc81e0aec7711e9')
 validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases <release at mozilla.com>
@@ -49,6 +51,9 @@
   # https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
   patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch
 
+  # https://bugzilla.mozilla.org/show_bug.cgi?id=1731495
+  patch -Np1 -i ../0002-Bug-1731495-Don-t-typecheck-the-pipewire-session_han.patch
+
   echo -n "$_google_api_key" >google-api-key
   echo -n "$_mozilla_api_key" >mozilla-api-key
 



More information about the arch-commits mailing list