- if (object_to_ref (tmp))
- {
- /* If its already registered, just update */
- spi_emit_cache_update (tmp, atk_adaptor_app_data->bus);
- }
- else if (has_manages_descendants (tmp))
- {
- /* If it has manages descendants, just register and update */
- register_accessible (tmp);
- spi_emit_cache_update (tmp, atk_adaptor_app_data->bus);
- }
- else
- {
- recurse = TRUE;
- }
-
- if (!recurse)
- {
- g_object_unref (G_OBJECT (tmp));
- }
-
- i++;
- }
-
- if (recurse)
- {
- /* Push onto stack */
- current = tmp;
- register_accessible (current);
-
- g_queue_peek_head_link (stack)->data = GINT_TO_POINTER (i);
- g_queue_push_head (stack, GINT_TO_POINTER (0));
- }
- else
- {
- /* Pop from stack */
- spi_emit_cache_update (current, atk_adaptor_app_data->bus);
- tmp = current;
- current = atk_object_get_parent (current);
- g_object_unref (G_OBJECT (tmp));
- g_queue_pop_head (stack);
- }
- }
- g_queue_free (stack);
-}
-
-/*---------------------------------------------------------------------------*/
-
-/*
- * Called when an already registered object is updated in such a
- * way that client side cache needs to be updated.
- */
-static void
-update_accessible (AtkObject *accessible)
-{
- guint ref = 0;
- g_assert(ATK_IS_OBJECT(accessible));
-
- ref = object_to_ref (accessible);
- if (ref)
- {
- spi_emit_cache_update (accessible, atk_adaptor_app_data->bus);
- }