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>
Mon, 9 Nov 2020 22:27:07 +0000 (22:27 +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 a4246649abf3339afc4caae029937113c5887968..1126bf911719eddb09135b0ab4d0901231de57a3 100644 (file)
@@ -24,6 +24,7 @@
 #  include "WakeLockListener.h"
 #endif
 #include "gfxPlatform.h"
+#include "nsAppRunner.h"
 #include "ScreenHelperGTK.h"
 #include "HeadlessScreenHelper.h"
 #include "mozilla/widget/ScreenManager.h"
@@ -178,10 +179,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);
       }
     }
   }