Index: gailwidget.c
===================================================================
RCS file: /cvs/gnome/gail/gail/gailwidget.c,v
retrieving revision 1.93
diff -u -p -r1.93 gailwidget.c
--- gailwidget.c	22 Mar 2004 10:54:41 -0000	1.93
+++ gailwidget.c	21 Apr 2004 07:47:13 -0000
@@ -510,7 +510,11 @@ gail_widget_ref_state_set (AtkObject *ac
   
       if (GTK_WIDGET_HAS_FOCUS (widget))
         {
-          atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
+          AtkObject *focus_obj;
+
+          focus_obj = g_object_get_data (G_OBJECT (accessible), "gail-focus-object");
+          if (focus_obj == NULL)
+            atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
         }
     }
   return state_set;
@@ -978,7 +982,13 @@ static void 
 gail_widget_focus_event (AtkObject   *obj,
                          gboolean    focus_in)
 {
-  atk_object_notify_state_change (obj, ATK_STATE_FOCUSED, focus_in);
+  AtkObject *focus_obj;
+
+  focus_obj = g_object_get_data (G_OBJECT (obj), "gail-focus-object");
+  g_print ("At %d in %s %p %p\n", __LINE__, __FILE__, focus_obj, obj);
+  if (focus_obj == NULL)
+    focus_obj = obj;
+  atk_object_notify_state_change (focus_obj, ATK_STATE_FOCUSED, focus_in);
 }
 
 static GtkWidget*
