Do not do notification if previously notified object is the same as this
authorPadraig O'Briain <padraigo@src.gnome.org>
Tue, 19 Mar 2002 14:16:00 +0000 (14:16 +0000)
committerPadraig O'Briain <padraigo@src.gnome.org>
Tue, 19 Mar 2002 14:16:00 +0000 (14:16 +0000)
* atk/atkutil.c (atk_focus_tracker_notify):
Do not do notification if previously notified object is the same as
this object

ChangeLog
atk/atkutil.c

index 955c608..101e46e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-19  Padraig O'Briain  <padraig.obriain@sun.com>
+
+       * atk/atkutil.c (atk_focus_tracker_notify):
+       Do not do notification if previously notified object is the same as
+       this object
+
 2002-03-14  Tor Lillqvist  <tml@iki.fi>
 
        * atk/Makefile.am: Use correct name for the DLL when generating
index 65a762a..459a820 100755 (executable)
@@ -174,11 +174,21 @@ void
 atk_focus_tracker_notify (AtkObject       *object)
 {
   FocusTracker *item;
+  static AtkObject *previous_focus_object = NULL;
   guint i;
 
   if (trackers == NULL)
     return;
 
+  if (object == previous_focus_object)
+    return;
+  else
+    {
+      if (previous_focus_object)
+        g_object_unref (previous_focus_object);
+      previous_focus_object = g_object_ref (object);
+    }
+  
   for (i = 0; i < trackers->len; i++)
   {
     item = &g_array_index (trackers, FocusTracker, i);