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>
Sat, 23 Mar 2019 23:15:11 +0000 (23:15 +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 e696af9e0a88d6c2a2aa3d47d8325624908f6d26..0b4dd693ee8151a9d8e871f25434b5250b69d601 100644 (file)
@@ -23,6 +23,7 @@
 #include "WakeLockListener.h"
 #endif
 #include "gfxPlatform.h"
+#include "nsAppRunner.h"
 #include "ScreenHelperGTK.h"
 #include "HeadlessScreenHelper.h"
 #include "mozilla/widget/ScreenManager.h"
@@ -163,10 +164,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);
     }
   }