OCaml 4.13.1 rebuild, fixes FS#72998
[arch-packages.git] / firefox / trunk / 0001-Use-remoting-name-for-GDK-application-names.patch
blob206ec0a85b3ce2895cb7c651706cdb7e964e4aeb
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
3 Date: Mon, 25 Mar 2019 20:30:11 +0100
4 Subject: [PATCH] Use remoting name for GDK application names
6 ---
7 toolkit/xre/nsAppRunner.cpp | 6 +-----
8 widget/gtk/nsAppShell.cpp | 12 +++++-------
9 2 files changed, 6 insertions(+), 12 deletions(-)
11 diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
12 index 60ea6966cccf..ae862aba01b3 100644
13 --- a/toolkit/xre/nsAppRunner.cpp
14 +++ b/toolkit/xre/nsAppRunner.cpp
15 @@ -4299,11 +4299,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
16 // consistently.
18 // Set program name to the one defined in application.ini.
19 - {
20 - nsAutoCString program(gAppData->name);
21 - ToLowerCase(program);
22 - g_set_prgname(program.get());
23 - }
24 + g_set_prgname(gAppData->remotingName);
26 // Initialize GTK here for splash.
28 diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp
29 index 7090bd2ef350..76bda087be72 100644
30 --- a/widget/gtk/nsAppShell.cpp
31 +++ b/widget/gtk/nsAppShell.cpp
32 @@ -27,6 +27,8 @@
33 # include "nsIObserverService.h"
34 #endif
35 #include "gfxPlatform.h"
36 +#include "nsAppRunner.h"
37 +#include "mozilla/XREAppData.h"
38 #include "ScreenHelperGTK.h"
39 #include "HeadlessScreenHelper.h"
40 #include "mozilla/widget/ScreenManager.h"
41 @@ -256,13 +258,9 @@ nsresult nsAppShell::Init() {
42 // See https://bugzilla.gnome.org/show_bug.cgi?id=747634
44 // Only bother doing this for the parent process, since it's the one
45 - // creating top-level windows. (At this point, a child process hasn't
46 - // received the list of registered chrome packages, so the
47 - // GetBrandShortName call would fail anyway.)
48 - nsAutoString brandName;
49 - mozilla::widget::WidgetUtils::GetBrandShortName(brandName);
50 - if (!brandName.IsEmpty()) {
51 - gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get());
52 + // creating top-level windows.
53 + if (gAppData) {
54 + gdk_set_program_class(gAppData->remotingName);