summaryrefslogtreecommitdiff
path: root/firefox/0001-Use-remoting-name-for-GDK-application-names.patch
blob: 73ae042cc17ce59550d0b7b983d4030ab02d1ee7 (plain)
    1 From 5025aab61517c8608b555ba929c61eb0706bd6bd 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
    5 
    6 ---
    7  toolkit/xre/nsAppRunner.cpp |  6 +-----
    8  widget/gtk/nsAppShell.cpp   | 11 ++++-------
    9  2 files changed, 5 insertions(+), 12 deletions(-)
   10 
   11 diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
   12 index da8289200e72..452195b146f3 100644
   13 --- a/toolkit/xre/nsAppRunner.cpp
   14 +++ b/toolkit/xre/nsAppRunner.cpp
   15 @@ -3785,11 +3785,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
   16    // consistently.
   17  
   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);
   25  
   26    // Initialize GTK here for splash.
   27  
   28 diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp
   29 index 163a93e2d1a4..4b6d45217671 100644
   30 --- a/widget/gtk/nsAppShell.cpp
   31 +++ b/widget/gtk/nsAppShell.cpp
   32 @@ -24,6 +24,7 @@
   33  #  include "WakeLockListener.h"
   34  #endif
   35  #include "gfxPlatform.h"
   36 +#include "nsAppRunner.h"
   37  #include "ScreenHelperGTK.h"
   38  #include "HeadlessScreenHelper.h"
   39  #include "mozilla/widget/ScreenManager.h"
   40 @@ -175,13 +176,9 @@ nsresult nsAppShell::Init() {
   41        // See https://bugzilla.gnome.org/show_bug.cgi?id=747634
   42        //
   43        // Only bother doing this for the parent process, since it's the one
   44 -      // creating top-level windows. (At this point, a child process hasn't
   45 -      // received the list of registered chrome packages, so the
   46 -      // GetBrandShortName call would fail anyway.)
   47 -      nsAutoString brandName;
   48 -      mozilla::widget::WidgetUtils::GetBrandShortName(brandName);
   49 -      if (!brandName.IsEmpty()) {
   50 -        gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get());
   51 +      // creating top-level windows.
   52 +      if (gAppData) {
   53 +        gdk_set_program_class(gAppData->remotingName);
   54        }
   55      }
   56    }
   57 -- 
   58 2.26.1

Generated by cgit