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 Dec 2019 23:56:07 +0000 (23:56 +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 b4010bf38d9148f80031cb80a0033d9a51a3d9d7..2af4072ebe1732b850720ae6ed99104b3459c7c6 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"
@@ -174,10 +175,8 @@ nsresult nsAppShell::Init() {
     // option when program uses gdk_set_program_class().
     //
     // See https://bugzilla.gnome.org/show_bug.cgi?id=747634
-    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);
     }
   }