? ariel.patch
? gdm-session-atspi-5.patch
? gnome-session-atspi-3.patch
? gnome-session-atspi-4.patch
? gnome-session-atspi.patch
? gnome-session.patch
Index: gsm-at-startup.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/gsm-at-startup.c,v
retrieving revision 1.5
diff -u -r1.5 gsm-at-startup.c
--- gsm-at-startup.c	24 Apr 2006 21:55:25 -0000	1.5
+++ gsm-at-startup.c	6 Sep 2006 19:26:23 -0000
@@ -4,12 +4,17 @@
 #include "gsm-at-startup.h"
 #include "util.h"
 
+#include <gtk/gtk.h>
+#include <gnome.h>
 #include <gdk/gdk.h>
+#include <gdk/gdkx.h>
 #include <libgnome/libgnome.h>
 #include <gconf/gconf-client.h>
 
 #define AT_STARTUP_KEY    "/desktop/gnome/accessibility/startup/exec_ats"
 
+static Atom AT_SPI_IOR;
+
 static void
 gsm_assistive_tech_exec (gchar *exec_string)
 {
@@ -19,6 +24,75 @@
     g_spawn_command_line_async (exec_string, &error);
     g_free (s);
   }
+}
+
+
+static gboolean 
+gsm_ior_is_present (void)
+{
+     Atom actual_type;
+     int actual_format;
+     unsigned char *ior;
+     unsigned long nitems;
+     unsigned long leftover;
+
+     if (!AT_SPI_IOR)
+	  AT_SPI_IOR = XInternAtom (GDK_DISPLAY (), "AT_SPI_IOR", False); 
+     
+     XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (), AT_SPI_IOR, 0L, 
+			 (long) BUFSIZ, False, 
+			 (Atom) 31, &actual_type, &actual_format,
+			 &nitems, &leftover, &ior); 
+     if (ior != NULL)
+	  return TRUE;
+     
+     return FALSE;
+}
+
+
+static Bool 
+gsm_wait_notify (Display *d, 
+		 XEvent *e, 
+		 char *arg) 
+{
+
+     if (e->type == PropertyNotify)
+     {
+	  XPropertyEvent *property = &e->xproperty;
+
+	  return property->atom == AT_SPI_IOR; 
+     }
+     
+     return  FALSE;
+}
+
+static void
+gsm_watch_ior (void)
+{
+	Display *d = GDK_DISPLAY ();
+	Window w = DefaultRootWindow (d);
+
+	XSelectInput (d, w, PropertyChangeMask);
+	
+}
+
+static void 
+gsm_filter_property (void)
+{
+     XEvent event;
+     XIfEvent (GDK_DISPLAY(), &event, gsm_wait_notify, NULL);	
+}
+
+void 
+gsm_assistive_registry_start (void)
+{
+     gsm_watch_ior ();
+     gsm_assistive_tech_exec ("/usr/libexec/at-spi-registryd");
+   
+     while (!gsm_ior_is_present ())
+	  gsm_filter_property ();
+
+     return;
 }
 
 void 
Index: gsm-at-startup.h
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/gsm-at-startup.h,v
retrieving revision 1.2
diff -u -r1.2 gsm-at-startup.h
--- gsm-at-startup.h	10 Jan 2006 00:48:20 -0000	1.2
+++ gsm-at-startup.h	6 Sep 2006 19:26:23 -0000
@@ -1,6 +1,7 @@
 #ifndef GSM_AT_STARTUP_H
 #define GSM_AT_STARTUP_H
 
+void gsm_assistive_registry_start (void);
 void gsm_assistive_technologies_start (void);
 void gsm_at_set_gtk_modules (void);
 
Index: main.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/main.c,v
retrieving revision 1.78
diff -u -r1.78 main.c
--- main.c	24 Apr 2006 21:50:44 -0000	1.78
+++ main.c	6 Sep 2006 19:26:23 -0000
@@ -395,9 +395,11 @@
   gconf_client_add_dir (gconf_client, GSM_GCONF_CONFIG_PREFIX, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); 
   a_t_support = gconf_client_get_bool (gconf_client, ACCESSIBILITY_KEY, NULL);
 
-  if (a_t_support)
-    gsm_at_set_gtk_modules ();
-
+  if (a_t_support){
+       gsm_assistive_registry_start ();
+       gsm_at_set_gtk_modules ();
+  }
+    
   gnome_program_init("gnome-session", VERSION, LIBGNOMEUI_MODULE, argc, argv, 
 		  GNOME_PARAM_POPT_TABLE, options,
 		  NULL);
