Index: atk/atkobject.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atkobject.c,v
retrieving revision 1.63
diff -u -p -r1.63 atkobject.c
--- atk/atkobject.c	10 Sep 2003 10:19:51 -0000	1.63
+++ atk/atkobject.c	26 Nov 2003 10:00:54 -0000
@@ -1025,6 +1025,7 @@ atk_object_real_ref_state_set (AtkObject
 {
   AtkStateSet *state_set;
   AtkObject *ap;
+  AtkObject *focus_object;
 
   state_set = atk_state_set_new ();
 
@@ -1041,6 +1042,9 @@ atk_object_real_ref_state_set (AtkObject
           if (atk_selection_is_child_selected(ATK_SELECTION (ap), i))
             atk_state_set_add_state (state_set, ATK_STATE_SELECTED);
       } 
+  focus_object = atk_get_focus_object ();
+  if (focus_object == accessible)
+    atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
 
   return state_set; 
 }
Index: atk/atkutil.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atkutil.c,v
retrieving revision 1.20
diff -u -p -r1.20 atkutil.c
--- atk/atkutil.c	26 Apr 2002 14:39:53 -0000	1.20
+++ atk/atkutil.c	26 Nov 2003 10:00:54 -0000
@@ -20,9 +20,10 @@
 #include "atkutil.h"
 #include "atkmarshal.c"
 
-
 static void atk_util_class_init (AtkUtilClass *klass);
 
+static AtkObject *previous_focus_object = NULL;
+
 GType
 atk_util_get_type (void)
 {
@@ -174,7 +175,6 @@ void
 atk_focus_tracker_notify (AtkObject       *object)
 {
   FocusTracker *item;
-  static AtkObject *previous_focus_object = NULL;
   guint i;
 
   if (trackers == NULL)
@@ -315,6 +315,19 @@ atk_get_root (void)
   g_type_class_unref (klass);
 
   return retval;
+}
+
+/**
+ * atk_get_focus_object:
+ *
+ * Gets the currently focused object.
+ *
+ * Returns: the currently focused object for the current application
+ **/
+AtkObject*
+atk_get_focus_object (void)
+{
+  return previous_focus_object;
 }
 
 /**
Index: atk/atkutil.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkutil.h,v
retrieving revision 1.13
diff -u -p -r1.13 atkutil.h
--- atk/atkutil.h	5 Sep 2002 12:49:20 -0000	1.13
+++ atk/atkutil.h	26 Nov 2003 10:00:54 -0000
@@ -163,6 +163,8 @@ void	atk_remove_key_event_listener (guin
  */
 AtkObject* atk_get_root(void);
 
+AtkObject* atk_get_focus_object (void);
+
 /*
  * Returns name string for the GUI toolkit.
  */
Index: docs/atk-sections.txt
===================================================================
RCS file: /cvs/gnome/atk/docs/atk-sections.txt,v
retrieving revision 1.36
diff -u -p -r1.36 atk-sections.txt
--- docs/atk-sections.txt	20 Mar 2003 11:00:57 -0000	1.36
+++ docs/atk-sections.txt	26 Nov 2003 10:00:54 -0000
@@ -515,6 +515,7 @@ AtkKeySnoopFunc
 atk_add_key_event_listener
 atk_remove_key_event_listener
 atk_get_root
+atk_get_focus_object
 atk_get_toolkit_name
 atk_get_toolkit_version
 <SUBSECTION Standard>
Index: docs/tmpl/atkutil.sgml
===================================================================
RCS file: /cvs/gnome/atk/docs/tmpl/atkutil.sgml,v
retrieving revision 1.19
diff -u -p -r1.19 atkutil.sgml
--- docs/tmpl/atkutil.sgml	5 Sep 2002 12:49:21 -0000	1.19
+++ docs/tmpl/atkutil.sgml	26 Nov 2003 10:00:54 -0000
@@ -161,6 +161,14 @@ An AtkKeySnoopFunc is a function which i
 @Returns: 
 
 
+<!-- ##### FUNCTION atk_get_focus_object ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
 <!-- ##### FUNCTION atk_get_toolkit_name ##### -->
 <para>
 
