mozilla-startup-notification.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Mon, 07 Dec 2009 09:20:00 +0100
changeset 19 f21a8e50d93d
parent 8 19a8c8d53349
child 22 28fc3b05b018
permissions -rw-r--r--
BNC#561027 - firefox urlbar style broken -> stripped down patch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
19a8c8d53349 Fixed patch comments
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1
diff changeset
     1
From: Lubos Lunak <llunak@suse.cz>
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:
19a8c8d53349 Fixed patch comments
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1
diff changeset
     4
http://bugzilla.novell.com/show_bug.cgi?id=518603
19a8c8d53349 Fixed patch comments
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1
diff changeset
     5
https://bugzilla.mozilla.org/show_bug.cgi?id=416053
19a8c8d53349 Fixed patch comments
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1
diff changeset
     6
1
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     7
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     8
--- a/toolkit/xre/nsAppRunner.cpp
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     9
+++ b/toolkit/xre/nsAppRunner.cpp
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    10
@@ -3342,23 +3342,16 @@ XRE_main(int argc, char* argv[], const n
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    11
         }
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    12
         dirProvider.DoStartup();
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    13
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    14
         PRBool shuttingDown = PR_FALSE;
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    15
         appStartup->GetShuttingDown(&shuttingDown);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    16
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    17
         nsCOMPtr<nsICommandLineRunner> cmdLine;
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    18
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    19
-#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    20
-        nsRefPtr<nsGTKToolkit> toolkit = GetGTKToolkit();
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    21
-        if (toolkit && !desktopStartupID.IsEmpty()) {
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    22
-          toolkit->SetDesktopStartupID(desktopStartupID);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    23
-        }
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    24
-#endif
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    25
-
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    26
         nsCOMPtr<nsIFile> workingDir;
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    27
         rv = NS_GetSpecialDirectory(NS_OS_CURRENT_WORKING_DIR, getter_AddRefs(workingDir));
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    28
         NS_ENSURE_SUCCESS(rv, 1);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    29
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    30
         if (!shuttingDown) {
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    31
           cmdLine = do_CreateInstance("@mozilla.org/toolkit/command-line;1");
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    32
           NS_ENSURE_TRUE(cmdLine, 1);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    33
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    34
@@ -3376,16 +3369,23 @@ XRE_main(int argc, char* argv[], const n
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    35
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    36
           NS_TIMELINE_ENTER("appStartup->CreateHiddenWindow");
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    37
           rv = appStartup->CreateHiddenWindow();
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    38
           NS_TIMELINE_LEAVE("appStartup->CreateHiddenWindow");
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    39
           NS_ENSURE_SUCCESS(rv, 1);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    40
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    41
           MOZ_SPLASHSCREEN_UPDATE(50);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    42
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    43
+#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    44
+          nsRefPtr<nsGTKToolkit> toolkit = GetGTKToolkit();
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    45
+          if (toolkit && !desktopStartupID.IsEmpty()) {
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    46
+            toolkit->SetDesktopStartupID(desktopStartupID);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    47
+          }
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    48
+#endif
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    49
+
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    50
           // Extension Compatibility Checking and Startup
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    51
           if (gAppData->flags & NS_XRE_ENABLE_EXTENSION_MANAGER) {
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    52
             nsCOMPtr<nsIExtensionManager> em(do_GetService("@mozilla.org/extensions/manager;1"));
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    53
             NS_ENSURE_TRUE(em, 1);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    54
 
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    55
             if (upgraded) {
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    56
               rv = em->CheckForMismatches(&needsRestart);
045edd78eceb Add missing files
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    57
               if (NS_FAILED(rv)) {