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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64
7bb1edb78dd5 Update to 1.9.2.4/3.6.4pre to prepare the bigger Lorentz merge
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 22
diff changeset
     1
From: Ginn Chen <ginn.chen@sun.com>
8
19a8c8d53349 Fixed patch comments
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1
diff changeset
     2
Subject: Firefox 3.5 broken startup notification
19a8c8d53349 Fixed patch comments
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1
diff changeset
     3
References:
22
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
     4
https://bugzilla.mozilla.org/show_bug.cgi?id=534845
8
19a8c8d53349 Fixed patch comments
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1
diff changeset
     5
1
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     6
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     7
--- a/toolkit/xre/nsAppRunner.cpp
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     8
+++ b/toolkit/xre/nsAppRunner.cpp
64
7bb1edb78dd5 Update to 1.9.2.4/3.6.4pre to prepare the bigger Lorentz merge
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 22
diff changeset
     9
@@ -3556,30 +3556,23 @@ XRE_main(int argc, char* argv[], const n
22
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    10
 #ifdef XP_MACOSX
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    11
       if (gBinaryPath) {
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    12
         static char kEnvVar[MAXPATHLEN];
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    13
         sprintf(kEnvVar, "XRE_BINARY_PATH=%s", gBinaryPath);
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    14
         PR_SetEnv(kEnvVar);
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    15
       }
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    16
 #endif
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    17
 
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    18
-// XXXkt s/MOZ_TOOLKIT_GTK2/MOZ_WIDGET_GTK2/?
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    19
-// but the hidden window has been destroyed so toolkit is NULL anyway.
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    20
-#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_TOOLKIT_GTK2)
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    21
-      nsGTKToolkit* toolkit = GetGTKToolkit();
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    22
-      if (toolkit) {
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    23
-        nsCAutoString currentDesktopStartupID;
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    24
-        toolkit->GetDesktopStartupID(&currentDesktopStartupID);
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    25
-        if (!currentDesktopStartupID.IsEmpty()) {
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    26
-          nsCAutoString desktopStartupEnv;
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    27
-          desktopStartupEnv.AssignLiteral("DESKTOP_STARTUP_ID=");
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    28
-          desktopStartupEnv.Append(currentDesktopStartupID);
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    29
-          // Leak it with extreme prejudice!
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    30
-          PR_SetEnv(ToNewCString(desktopStartupEnv));
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    31
-        }
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    32
+#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    33
+      if (!desktopStartupID.IsEmpty()) {
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    34
+        nsCAutoString desktopStartupEnv;
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    35
+        desktopStartupEnv.AssignLiteral("DESKTOP_STARTUP_ID=");
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    36
+        desktopStartupEnv.Append(desktopStartupID);
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    37
+        // Leak it with extreme prejudice!
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    38
+        PR_SetEnv(ToNewCString(desktopStartupEnv));
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    39
       }
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    40
 #endif
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    41
 
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    42
 #ifdef MOZ_WIDGET_GTK2
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    43
       MOZ_gdk_display_close(display);
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    44
 #endif
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    45
 
28fc3b05b018 Incorporated another startup notification fix (bmo#534845)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 8
diff changeset
    46
       rv = LaunchChild(nativeApp, appInitiatedRestart);