From: Mike Gorse Date: Fri, 28 Nov 2008 23:07:00 +0000 (-0600) Subject: 2008-11-28 Mike Gorse X-Git-Tag: AT_SPI2_ATK_2_12_0~574 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2965d38bf07fb167c0594813d9072fba1b8b56e7;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git 2008-11-28 Mike Gorse * event.c: Only call atk_dbus_register_subtree on the child that was just added. --- diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c index ddc3536..73e13a0 100644 --- a/atk-adaptor/event.c +++ b/atk-adaptor/event.c @@ -343,9 +343,31 @@ tree_update_children_listener (GSignalInvocationHint *signal_hint, gpointer data) { AtkObject *accessible; + const gchar *detail = NULL; + AtkObject *child; + gboolean child_needs_unref = FALSE; + + if (signal_hint->detail) + detail = g_quark_to_string (signal_hint->detail); accessible = g_value_get_object (¶m_values[0]); - atk_dbus_register_subtree(accessible); + if (!strcmp (detail, "add")) + { + gpointer child; + int index = g_value_get_uint (param_values + 1); + child = g_value_get_pointer (param_values + 2); + if (ATK_IS_OBJECT (child)) + g_object_ref (child); + else + child = atk_object_ref_accessible_child (accessible, index); + if (ATK_IS_OBJECT (child)) + { + atk_dbus_register_subtree (child); + g_object_unref (child); + } + else + atk_dbus_register_subtree(accessible); + } return TRUE; }