Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1318)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-01-09  Li Yuan  <li.yuan@sun.com>
+
+	* gail/gailtreeview.c: (gail_tree_view_ref_child),
+	(idle_cursor_changed):
+	Bug #497218. Emit "active-descendant-changed" when focus first comes
+	into treeview. Add/remove ATK_STATE_FOCUSED when cursor changes.
+
 2007-12-12  Li Yuan  <li.yuan@sun.com>
 
 	* gail/gailutil.c: (_listener_info_destroy):
Index: gail/gailtreeview.c
===================================================================
--- gail/gailtreeview.c	(revision 1318)
+++ gail/gailtreeview.c	(working copy)
@@ -1053,6 +1053,9 @@
           {
             gailview->focus_cell = g_object_ref (cell);
             gail_cell_add_state (cell, ATK_STATE_FOCUSED, FALSE);
+            g_signal_emit_by_name (gailview,
+                                   "active-descendant-changed",
+                                   cell);
           }
       }
     g_list_free (renderer_list); 
@@ -2705,12 +2708,16 @@
           if (gail_tree_view->focus_cell)
             {
               gail_cell_remove_state (GAIL_CELL (gail_tree_view->focus_cell), ATK_STATE_ACTIVE, FALSE); 
+              gail_cell_remove_state (GAIL_CELL (gail_tree_view->focus_cell), ATK_STATE_FOCUSED, FALSE);
               g_object_unref (gail_tree_view->focus_cell);
             }
           gail_tree_view->focus_cell = cell;
 
           if (GTK_WIDGET_HAS_FOCUS (widget))
-            gail_cell_add_state (GAIL_CELL (cell), ATK_STATE_ACTIVE, FALSE);
+            {
+              gail_cell_add_state (GAIL_CELL (cell), ATK_STATE_ACTIVE, FALSE);
+              gail_cell_add_state (GAIL_CELL (cell), ATK_STATE_FOCUSED, FALSE);
+            }
           g_signal_emit_by_name (parent,
                                  "active-descendant-changed",
                                  cell);
