summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPadraig O'Briain <padraigo@src.gnome.org>2002-03-19 14:16:00 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2002-03-19 14:16:00 +0000
commit797e32496f26c14b5da0e76ed525c874f29e8172 (patch)
treee423951a737f4b9bb2c0a98f2bc26df9e27a32e1
parent1d0e89d739a1cb440a19d91ece3610e61c0e8bbe (diff)
downloadatk-797e32496f26c14b5da0e76ed525c874f29e8172.tar.gz
Do not do notification if previously notified object is the same as this
* atk/atkutil.c (atk_focus_tracker_notify): Do not do notification if previously notified object is the same as this object
-rw-r--r--ChangeLog6
-rwxr-xr-xatk/atkutil.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 955c608..101e46e 100644
--- 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
diff --git a/atk/atkutil.c b/atk/atkutil.c
index 65a762a..459a820 100755
--- a/atk/atkutil.c
+++ b/atk/atkutil.c
@@ -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);