From c68eef9fb2df9f546ea37ce5e28f65c64ac6a15b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 16 Aug 2023 11:02:52 +0200 Subject: [PATCH] Added Fedora customization patch --- fedora-customization.patch | 34 ++++++++++++++++++++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 fedora-customization.patch diff --git a/fedora-customization.patch b/fedora-customization.patch new file mode 100644 index 0000000..2bcb335 --- /dev/null +++ b/fedora-customization.patch @@ -0,0 +1,34 @@ +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -5762,6 +5762,12 @@ int XREMain::XRE_main(int argc, char* ar + if (!mAppData->remotingName) { + mAppData->remotingName = mAppData->name; + } ++ ++ const char* appRemotingName = getenv("MOZ_APP_REMOTINGNAME"); ++ if (appRemotingName) { ++ mAppData->remotingName = strdup(appRemotingName); ++ } ++ + // used throughout this file + gAppData = mAppData.get(); + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -3448,7 +3448,13 @@ void* nsWindow::GetNativeData(uint32_t a + nsresult nsWindow::SetTitle(const nsAString& aTitle) { + if (!mShell) return NS_OK; + +- // convert the string into utf8 and set the title. ++ const char* appTitle = getenv("MOZ_APP_TITLE"); ++ if (appTitle) { ++ gtk_window_set_title(GTK_WINDOW(mShell), appTitle); ++ return NS_OK; ++ } ++ ++ // convert the string into utf8 and set the title. + #define UTF8_FOLLOWBYTE(ch) (((ch)&0xC0) == 0x80) + NS_ConvertUTF16toUTF8 titleUTF8(aTitle); + if (titleUTF8.Length() > NS_WINDOW_TITLE_MAX_LENGTH) { diff --git a/firefox.spec b/firefox.spec index 5a093c9..56c613c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 116.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -230,6 +230,7 @@ Patch226: rhbz-1354671.patch Patch228: disable-openh264-download.patch Patch229: firefox-nss-addon-hack.patch Patch230: firefox-enable-vaapi.patch +Patch231: fedora-customization.patch # Upstream patches Patch402: mozilla-1196777.patch @@ -505,6 +506,7 @@ This package contains results of tests executed during build. %patch228 -p1 -b .disable-openh264-download %patch229 -p1 -b .firefox-nss-addon-hack %patch230 -p1 -b .firefox-enable-vaapi +%patch231 -p1 -b .fedora-customization %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 @@ -1066,6 +1068,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 16 2023 Martin Stransky - 116.0.2-2 +- Added Fedora customization patch + * Mon Aug 7 2023 Martin Stransky - 116.0.2-1 - Updated to 116.0.2