Index: libgnomecanvas/gailcanvas.c
===================================================================
--- libgnomecanvas/gailcanvas.c	(revision 1285)
+++ libgnomecanvas/gailcanvas.c	(working copy)
@@ -21,6 +21,7 @@
 #include <libgnomecanvas/gnome-canvas.h>
 #include <libgnomecanvas/gnome-canvas-text.h>
 #include <libgnomecanvas/gnome-canvas-rich-text.h>
+#include <libgnomecanvas/gnome-canvas-widget.h>
 #include "gailcanvas.h"
 #include "gailcanvasitem.h"
 #include "gailcanvasgroupfactory.h"
@@ -39,6 +40,43 @@ static AtkObject* gail_canvas_ref_child 
 static void       adjustment_changed              (GtkAdjustment   *adjustment,
                                                    GnomeCanvas     *canvas);
 
+static void 	  gail_canvas_factory_class_init (GailCanvasFactoryClass *klass);
+
+static AtkObject* gail_canvas_factory_create_accessible (GObject *obj);
+
+static GType      gail_canvas_factory_get_accessible_type (void);
+
+G_DEFINE_TYPE (GailCanvasFactory,
+               gail_canvas_factory,
+               ATK_TYPE_OBJECT_FACTORY);
+
+static void
+gail_canvas_factory_init (GailCanvasFactory *foo)
+{
+  ;
+}
+
+static void
+gail_canvas_factory_class_init (GailCanvasFactoryClass *klass)
+{
+  AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
+
+  class->create_accessible = gail_canvas_factory_create_accessible;
+  class->get_accessible_type = gail_canvas_factory_get_accessible_type;
+}
+
+static AtkObject*
+gail_canvas_factory_create_accessible (GObject   *obj)
+{
+  return gail_canvas_new (obj);
+}
+
+static GType
+gail_canvas_factory_get_accessible_type (void)
+{
+  return GAIL_TYPE_CANVAS;
+}
+
 
 
 GType
@@ -48,7 +86,7 @@ gail_canvas_get_type (void)
 
   if (!type)
     {
-      GType parent_type = g_type_parent (GNOME_TYPE_CANVAS_ITEM);      
+      GType parent_type = g_type_parent (GNOME_TYPE_CANVAS);      
       AtkObjectFactory *factory = atk_registry_get_factory (
 				   atk_get_default_registry (), 
 				   parent_type);
@@ -72,7 +110,7 @@ gail_canvas_get_type (void)
       tinfo.instance_size = query.instance_size;
 
       /* use the size obtained from the parent type factory */
-      type = g_type_register_static (parent_type,
+      type = g_type_register_static (atkobject_parent_type,
                                      "GailCanvas", &tinfo, 0);
     }
 
@@ -85,11 +123,11 @@ static AtkObjectClass *parent_atk_object
  * Tell ATK how to create the appropriate AtkObject peers 
  **/
 void
-gail_canvas_init (GType widget_type)
+gail_canvas_init ()
 {
   atk_registry_set_factory_type (atk_get_default_registry (),
-				 widget_type, 
-				 gail_canvas_widget_factory_get_type ());
+				 GNOME_TYPE_CANVAS, 
+				 gail_canvas_factory_get_type ());
   atk_registry_set_factory_type (atk_get_default_registry (),
 				 GNOME_TYPE_CANVAS_GROUP, 
 				 gail_canvas_group_factory_get_type ());
@@ -100,6 +138,9 @@ gail_canvas_init (GType widget_type)
 				 GNOME_TYPE_CANVAS_RICH_TEXT, 
 				 gail_canvas_text_factory_get_type ());
   atk_registry_set_factory_type (atk_get_default_registry (),
+				 GNOME_TYPE_CANVAS_WIDGET,
+				 gail_canvas_widget_factory_get_type());
+  atk_registry_set_factory_type (atk_get_default_registry (),
 				 GNOME_TYPE_CANVAS_ITEM, 
 				 gail_canvas_item_factory_get_type ());
 }
Index: libgnomecanvas/gailcanvas.h
===================================================================
--- libgnomecanvas/gailcanvas.h	(revision 1285)
+++ libgnomecanvas/gailcanvas.h	(working copy)
@@ -34,8 +34,28 @@ G_BEGIN_DECLS
 #define GAIL_IS_CANVAS_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_CANVAS))
 #define GAIL_CANVAS_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_CANVAS, GailCanvasClass))
 
+#define GAIL_TYPE_CANVAS_FACTORY            (gail_canvas_factory_get_type ())
+#define GAIL_CANVAS_FACTORY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_CANVAS_FACTORY, GailCanvasFactory))
+#define GAIL_CANVAS_FACTORY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_CANVAS_FACTORY, GailCanvasFactoryClass))
+#define GAIL_IS_CANVAS_FACTORY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_CANVAS_FACTORY))
+#define GAIL_IS_CANVAS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_CANVAS_FACTORY))
+#define GAIL_CANVAS_FACTORY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_CANVAS_FACTORY, GailCanvasFactoryClass))
+
 typedef struct _GailCanvas                 GailCanvas;
 typedef struct _GailCanvasClass            GailCanvasClass;
+typedef struct _GailCanvasFactory          GailCanvasFactory;
+typedef struct _GailCanvasFactoryClass     GailCanvasFactoryClass;
+
+struct _GailCanvasFactory
+{
+  AtkObjectFactory parent;
+};
+
+struct _GailCanvasFactoryClass
+{
+  AtkObjectFactoryClass parent_class;
+};
+
 
 GType gail_canvas_get_type (void);
 
@@ -45,7 +65,9 @@ struct _GailCanvasClass;
 
 AtkObject* gail_canvas_new (GtkWidget *widget);
 
-void gail_canvas_init (GType canvas_type);
+void gail_canvas_init ();
+
+GType gail_canvas_factory_get_type(void);
 
 G_END_DECLS
 
Index: libgnomecanvas/gnome-canvas.c
===================================================================
--- libgnomecanvas/gnome-canvas.c	(revision 1285)
+++ libgnomecanvas/gnome-canvas.c	(working copy)
@@ -2076,6 +2076,8 @@ gnome_canvas_class_init (GnomeCanvasClas
 			      NULL, NULL,
 			      g_cclosure_marshal_VOID__POINTER,
 			      G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+	gail_canvas_init();
 }
 
 /* Callback used when the root item of a canvas is destroyed.  The user should
@@ -2135,6 +2137,7 @@ gnome_canvas_init (GnomeCanvas *canvas)
 						    canvas);
 
 	canvas->need_repick = TRUE;
+
 }
 
 /* Convenience function to remove the idle handler of a canvas */
