PKGBUILDs/extra/firefox/0001-Use-remoting-name-for-GDK-application-names.patch

58 lines
2 KiB
Diff
Raw Normal View History

2020-09-24 20:14:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2019-07-20 15:56:53 +00:00
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Mon, 25 Mar 2019 20:30:11 +0100
Subject: [PATCH] Use remoting name for GDK application names
---
2020-06-02 12:40:58 +00:00
toolkit/xre/nsAppRunner.cpp | 6 +-----
2020-11-27 15:21:20 +00:00
widget/gtk/nsAppShell.cpp | 12 +++++-------
2 files changed, 6 insertions(+), 12 deletions(-)
2019-07-20 15:56:53 +00:00
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
2021-09-08 12:50:51 +00:00
index 055be3e7a3554..f660bd26e331c 100644
2019-07-20 15:56:53 +00:00
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
2021-09-08 12:50:51 +00:00
@@ -4304,11 +4304,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
2019-07-20 15:56:53 +00:00
// consistently.
// Set program name to the one defined in application.ini.
- {
- nsAutoCString program(gAppData->name);
- ToLowerCase(program);
- g_set_prgname(program.get());
- }
+ g_set_prgname(gAppData->remotingName);
// Initialize GTK here for splash.
diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp
2021-07-14 04:53:22 +00:00
index 60de473de07ab..004c066575c17 100644
2019-07-20 15:56:53 +00:00
--- a/widget/gtk/nsAppShell.cpp
+++ b/widget/gtk/nsAppShell.cpp
2020-11-27 15:21:20 +00:00
@@ -24,6 +24,8 @@
2019-07-20 15:56:53 +00:00
# include "WakeLockListener.h"
#endif
#include "gfxPlatform.h"
+#include "nsAppRunner.h"
2020-11-27 15:21:20 +00:00
+#include "mozilla/XREAppData.h"
2019-07-20 15:56:53 +00:00
#include "ScreenHelperGTK.h"
#include "HeadlessScreenHelper.h"
#include "mozilla/widget/ScreenManager.h"
2021-07-14 04:53:22 +00:00
@@ -152,13 +154,9 @@ nsresult nsAppShell::Init() {
2020-06-02 12:40:58 +00:00
// See https://bugzilla.gnome.org/show_bug.cgi?id=747634
//
// Only bother doing this for the parent process, since it's the one
- // creating top-level windows. (At this point, a child process hasn't
- // received the list of registered chrome packages, so the
- // GetBrandShortName call would fail anyway.)
- nsAutoString brandName;
- mozilla::widget::WidgetUtils::GetBrandShortName(brandName);
- if (!brandName.IsEmpty()) {
- gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get());
+ // creating top-level windows.
+ if (gAppData) {
+ gdk_set_program_class(gAppData->remotingName);
}
2019-07-20 15:56:53 +00:00
}
}