Index: gailwindow.c
===================================================================
RCS file: /cvs/gnome/gail/gail/gailwindow.c,v
retrieving revision 1.48
diff -u -p -r1.48 gailwindow.c
--- gailwindow.c	23 Sep 2003 10:58:10 -0000	1.48
+++ gailwindow.c	10 Nov 2003 10:49:09 -0000
@@ -230,10 +230,13 @@ gail_window_real_initialize (AtkObject *
                              gpointer  data)
 {
   GtkWidget *widget;
+  GailWindow *window;
 
   ATK_OBJECT_CLASS (parent_class)->initialize (obj, data);
 
-  GAIL_WINDOW (obj)->name_change_handler = 0;
+  window = GAIL_WINDOW (obj);
+  window->name_change_handler = 0;
+  window->previous_name = g_strdup (gtk_window_get_title (GTK_WINDOW (data)));
   widget = GTK_WIDGET (data);
 
   g_signal_connect (data,
@@ -281,6 +284,11 @@ gail_window_finalize (GObject *object)
       g_source_remove (window->name_change_handler);
       window->name_change_handler = 0;
     }
+  if (window->previous_name)
+    {
+      g_free (window->previous_name);
+      window->previous_name = NULL;
+    }
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -445,11 +453,29 @@ gail_window_real_notify_gtk (GObject		*o
   GtkWidget *widget = GTK_WIDGET (obj);
   AtkObject* atk_obj = gtk_widget_get_accessible (widget);
   GailWindow *window = GAIL_WINDOW (atk_obj);
+  const gchar *name;
+  gboolean name_changed = FALSE;
 
   if (strcmp (pspec->name, "title") == 0)
     {
-      if (window->name_change_handler == 0)
-        window->name_change_handler = g_idle_add (idle_notify_name_change, atk_obj);    
+      name = gtk_window_get_title (GTK_WINDOW (widget));
+      if (name)
+        {
+         if (window->previous_name == NULL ||
+             strcmp (name, window->previous_name) != 0)
+           name_changed = TRUE;
+        }
+      else if (window->previous_name != NULL)
+        name_changed = TRUE;
+
+      if (name_changed)
+        {
+          g_free (window->previous_name);
+          window->previous_name = g_strdup (name);
+       
+          if (window->name_change_handler == 0)
+            window->name_change_handler = g_idle_add (idle_notify_name_change, atk_obj);    
+        }
     }
   else
     GAIL_WIDGET_CLASS (parent_class)->notify_gtk (obj, pspec);
Index: gailwindow.h
===================================================================
RCS file: /cvs/gnome/gail/gail/gailwindow.h,v
retrieving revision 1.6
diff -u -p -r1.6 gailwindow.h
--- gailwindow.h	11 Aug 2003 08:38:06 -0000	1.6
+++ gailwindow.h	10 Nov 2003 10:49:09 -0000
@@ -43,6 +43,7 @@ struct _GailWindow
   GailContainer parent;
 
   guint name_change_handler;
+  gchar *previous_name;
 };
 
 GType gail_window_get_type (void);
