--- app/main.c.orig	2010-08-07 21:59:33.000000000 +0200
+++ app/main.c	2010-08-07 22:01:39.000000000 +0200
@@ -67,6 +67,10 @@
 #include "gimp-log.h"
 #include "gimp-intl.h"
 
+#if defined (GDK_WINDOWING_QUARTZ) && defined (__x86_64__)
+  #include <igemacintegration/gtkosxapplication.h>
+#endif
+
 
 static gboolean  gimp_option_fatal_warnings   (const gchar  *option_name,
                                                const gchar  *value,
@@ -268,7 +272,10 @@
   const gchar    *abort_message;
   gchar          *basename;
   gint            i;
-
+#if defined (GDK_WINDOWING_QUARTZ) && defined (__x86_64__)
+  GtkOSXApplication   *theApp;
+#endif
+	
 #if defined (__GNUC__) && defined (_WIN64)
   /* mingw-w64, at least the unstable build from late July 2008,
    * starts subsystem:windows programs in main(), but passes them
@@ -394,6 +401,11 @@
 
   gimp_init_signal_handlers (stack_trace_mode);
 
+#if defined (GDK_WINDOWING_QUARTZ) && defined (__x86_64__)
+  theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+  gtk_osxapplication_ready(theApp);
+#endif
+	
   app_run (argv[0],
            filenames,
            system_gimprc,
@@ -413,6 +425,10 @@
            use_debug_handler,
            stack_trace_mode,
            pdb_compat_mode);
+	
+#if defined (GDK_WINDOWING_QUARTZ) && defined (__x86_64__)	
+  g_object_unref(theApp);
+#endif
 
   g_option_context_free (context);
 
