Removed the extra boolean parameter added to know when to unref the
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / adaptors / component-adaptor.c
index a3810de..a0e16ad 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "common/spi-dbus.h"
 #include "object.h"
+#include "introspection.h"
 
 static DBusMessage *
 impl_contains (DBusConnection * bus, DBusMessage * message, void *user_data)
@@ -66,6 +67,7 @@ impl_GetAccessibleAtPoint (DBusConnection * bus, DBusMessage * message,
   AtkComponent *component = (AtkComponent *) user_data;
   dbus_int32_t x, y;
   dbus_uint32_t coord_type;
+  DBusMessage *reply;
   DBusError error;
   AtkObject *child;
 
@@ -82,7 +84,10 @@ impl_GetAccessibleAtPoint (DBusConnection * bus, DBusMessage * message,
   child =
     atk_component_ref_accessible_at_point (component, x, y,
                                            (AtkCoordType) coord_type);
-  return spi_object_return_reference (message, child);
+  reply = spi_object_return_reference (message, child);
+  g_object_unref (child);
+
+  return child;
 }
 
 static DBusMessage *
@@ -305,5 +310,5 @@ void
 spi_initialize_component (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_COMPONENT, methods, NULL);
+                             SPI_DBUS_INTERFACE_COMPONENT, spi_org_a11y_atspi_Component, methods, NULL);
 };