mozilla-startup-notification.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Fri, 09 Apr 2010 20:51:09 +0200
branchmozilla-1.9.2
changeset 64 7bb1edb78dd5
parent 22 28fc3b05b018
permissions -rw-r--r--
Update to 1.9.2.4/3.6.4pre to prepare the bigger Lorentz merge

From: Ginn Chen <ginn.chen@sun.com>
Subject: Firefox 3.5 broken startup notification
References:
https://bugzilla.mozilla.org/show_bug.cgi?id=534845

diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3556,30 +3556,23 @@ XRE_main(int argc, char* argv[], const n
 #ifdef XP_MACOSX
       if (gBinaryPath) {
         static char kEnvVar[MAXPATHLEN];
         sprintf(kEnvVar, "XRE_BINARY_PATH=%s", gBinaryPath);
         PR_SetEnv(kEnvVar);
       }
 #endif
 
-// XXXkt s/MOZ_TOOLKIT_GTK2/MOZ_WIDGET_GTK2/?
-// but the hidden window has been destroyed so toolkit is NULL anyway.
-#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_TOOLKIT_GTK2)
-      nsGTKToolkit* toolkit = GetGTKToolkit();
-      if (toolkit) {
-        nsCAutoString currentDesktopStartupID;
-        toolkit->GetDesktopStartupID(&currentDesktopStartupID);
-        if (!currentDesktopStartupID.IsEmpty()) {
-          nsCAutoString desktopStartupEnv;
-          desktopStartupEnv.AssignLiteral("DESKTOP_STARTUP_ID=");
-          desktopStartupEnv.Append(currentDesktopStartupID);
-          // Leak it with extreme prejudice!
-          PR_SetEnv(ToNewCString(desktopStartupEnv));
-        }
+#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
+      if (!desktopStartupID.IsEmpty()) {
+        nsCAutoString desktopStartupEnv;
+        desktopStartupEnv.AssignLiteral("DESKTOP_STARTUP_ID=");
+        desktopStartupEnv.Append(desktopStartupID);
+        // Leak it with extreme prejudice!
+        PR_SetEnv(ToNewCString(desktopStartupEnv));
       }
 #endif
 
 #ifdef MOZ_WIDGET_GTK2
       MOZ_gdk_display_close(display);
 #endif
 
       rv = LaunchChild(nativeApp, appInitiatedRestart);