0001-Use-remoting-name-for-GDK-application-names.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From 1cab10b39cfda068100cab8c598f1ca0f50e4131 Mon Sep 17 00:00:00 2001
  2. Message-Id: <1cab10b39cfda068100cab8c598f1ca0f50e4131.1553597287.git.jan.steffens@gmail.com>
  3. From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
  4. Date: Mon, 25 Mar 2019 20:30:11 +0100
  5. Subject: [PATCH] Use remoting name for GDK application names
  6. ---
  7. toolkit/xre/nsAppRunner.cpp | 6 +-----
  8. widget/gtk/nsAppShell.cpp | 7 +++----
  9. 2 files changed, 4 insertions(+), 9 deletions(-)
  10. diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
  11. index 0b808ef215f06..28911c0ffeaec 100644
  12. --- a/toolkit/xre/nsAppRunner.cpp
  13. +++ b/toolkit/xre/nsAppRunner.cpp
  14. @@ -3728,11 +3728,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
  15. // consistently.
  16. // Set program name to the one defined in application.ini.
  17. - {
  18. - nsAutoCString program(gAppData->name);
  19. - ToLowerCase(program);
  20. - g_set_prgname(program.get());
  21. - }
  22. + g_set_prgname(gAppData->remotingName);
  23. // Initialize GTK here for splash.
  24. diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp
  25. index 0686ff814916b..ae4a4ea55f420 100644
  26. --- a/widget/gtk/nsAppShell.cpp
  27. +++ b/widget/gtk/nsAppShell.cpp
  28. @@ -24,6 +24,7 @@
  29. # include "WakeLockListener.h"
  30. #endif
  31. #include "gfxPlatform.h"
  32. +#include "nsAppRunner.h"
  33. #include "ScreenHelperGTK.h"
  34. #include "HeadlessScreenHelper.h"
  35. #include "mozilla/widget/ScreenManager.h"
  36. @@ -171,10 +172,8 @@ nsresult nsAppShell::Init() {
  37. // option when program uses gdk_set_program_class().
  38. //
  39. // See https://bugzilla.gnome.org/show_bug.cgi?id=747634
  40. - nsAutoString brandName;
  41. - mozilla::widget::WidgetUtils::GetBrandShortName(brandName);
  42. - if (!brandName.IsEmpty()) {
  43. - gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get());
  44. + if (gAppData) {
  45. + gdk_set_program_class(gAppData->remotingName);
  46. }
  47. }
  48. --
  49. 2.21.0