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, 23 Oct 2018 22:08:43 +0000 (23:08 +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 c81dac529b40ca0e8ea96b0abf99cfc17c37c903..f460a970755554b2cb4bfc6bf95ff79a486be404 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"
@@ -182,10 +183,8 @@ 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);
         }
     }