Use remoting name for call to gdk_set_program_class
authorMike Hommey <mh@glandium.org>
Sun, 2 Sep 2018 22:37:40 +0000 (07:37 +0900)
committerMike Hommey <glandium@debian.org>
Tue, 3 May 2022 21:43:23 +0000 (22:43 +0100)
Closes: #907574
Gbp-Pq: Topic debian-hacks
Gbp-Pq: Name Use-remoting-name-for-call-to-gdk_set_program_class.patch

widget/gtk/nsAppShell.cpp

index 60de473de07ab0b84952a7ad7b3b4ddf2ea91a3f..8b6cb9c3fe1df9fdbc1d7a22329f7aca5c8df0e9 100644 (file)
@@ -10,6 +10,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <gdk/gdk.h>
+#include "mozilla/XREAppData.h"
 #include "nsAppShell.h"
 #include "nsWindow.h"
 #include "mozilla/Logging.h"
@@ -24,6 +25,7 @@
 #  include "WakeLockListener.h"
 #endif
 #include "gfxPlatform.h"
+#include "nsAppRunner.h"
 #include "ScreenHelperGTK.h"
 #include "HeadlessScreenHelper.h"
 #include "mozilla/widget/ScreenManager.h"
@@ -155,10 +157,8 @@ nsresult nsAppShell::Init() {
       // 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());
+      if (gAppData) {
+        gdk_set_program_class(gAppData->remotingName);
       }
     }
   }