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)
committerCarsten Schoenert <c.schoenert@t-online.de>
Tue, 8 Mar 2022 08:57:12 +0000 (08:57 +0000)
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..490c79d44b66ecd23b5ed31e80aea7c09fa60c98 100644 (file)
 #  include "WakeLockListener.h"
 #endif
 #include "gfxPlatform.h"
+#include "nsAppRunner.h"
 #include "ScreenHelperGTK.h"
 #include "HeadlessScreenHelper.h"
 #include "mozilla/widget/ScreenManager.h"
+#include "mozilla/XREAppData.h"
 #ifdef MOZ_WAYLAND
 #  include "nsWaylandDisplay.h"
 #endif
@@ -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);
       }
     }
   }