mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1530052 - Use remoting name for GDK program name and class. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D80371
This commit is contained in:
parent
abf42b1167
commit
2c6ac8059a
@ -4370,11 +4370,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
|
||||
// consistently.
|
||||
|
||||
// Set program name to the one defined in application.ini.
|
||||
{
|
||||
nsAutoCString program(gAppData->name);
|
||||
ToLowerCase(program);
|
||||
g_set_prgname(program.get());
|
||||
}
|
||||
g_set_prgname(gAppData->remotingName);
|
||||
|
||||
// Initialize GTK here for splash.
|
||||
|
||||
|
@ -27,6 +27,8 @@
|
||||
# include "nsIObserverService.h"
|
||||
#endif
|
||||
#include "gfxPlatform.h"
|
||||
#include "nsAppRunner.h"
|
||||
#include "mozilla/XREAppData.h"
|
||||
#include "ScreenHelperGTK.h"
|
||||
#include "HeadlessScreenHelper.h"
|
||||
#include "mozilla/widget/ScreenManager.h"
|
||||
@ -257,13 +259,9 @@ nsresult nsAppShell::Init() {
|
||||
// See https://bugzilla.gnome.org/show_bug.cgi?id=747634
|
||||
//
|
||||
// Only bother doing this for the parent process, since it's the one
|
||||
// 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());
|
||||
// creating top-level windows.
|
||||
if (gAppData) {
|
||||
gdk_set_program_class(gAppData->remotingName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user