Fix a failure to respond to children-changed events in some cases
authorMike Gorse <mgorse@novell.com>
Tue, 28 Jun 2011 20:00:41 +0000 (15:00 -0500)
committerMike Gorse <mgorse@novell.com>
Tue, 28 Jun 2011 20:00:41 +0000 (15:00 -0500)
When a children-changed event is received, the cache of children should
be updated if present.  However, to test this, the code was checking for
the presence of a non-NULL list of children, which would be the case if
the object initially had 0 children.  The correct thing to do is to
check the accessible's cached_properties.

atspi/atspi-event-listener.c

index b81e5b6..e93ec6b 100644 (file)
@@ -168,7 +168,7 @@ cache_process_children_changed (AtspiEvent *event)
   AtspiAccessible *child;
 
   if (!G_VALUE_HOLDS (&event->any_data, ATSPI_TYPE_ACCESSIBLE) ||
-      !event->source->children ||
+      !(event->source->cached_properties & ATSPI_CACHE_CHILDREN) ||
       atspi_state_set_contains (event->source->states, ATSPI_STATE_MANAGES_DESCENDANTS))
     return;