Post-release version bump
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / adaptors / socket-adaptor.c
index 58d19d5..ed6faa3 100644 (file)
@@ -25,8 +25,8 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
-#include "common/spi-stateset.h"
+#include "spi-dbus.h"
+#include "accessible-stateset.h"
 #include "object.h"
 #include "introspection.h"
 #include "bridge.h"
@@ -49,7 +49,7 @@ new_socket_call_message (AtkComponent *component, const char *member)
       DBusMessage *message;
       *(path_parent++) = '\0';
       message = dbus_message_new_method_call (bus_parent, path_parent,
-                                              SPI_DBUS_INTERFACE_COMPONENT,
+                                              ATSPI_DBUS_INTERFACE_COMPONENT,
                                               member);
       g_free (bus_parent);
       return message;
@@ -117,7 +117,7 @@ atspi_plug_component_get_position (AtkComponent *component, gint *x, gint *y,
   dbus_message_unref (message);
   if (!reply)
     return;
-  if (!dbus_message_get_args (reply, &error, DBUS_TYPE_INT32, &x_dbus,
+  if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_INT32, &x_dbus,
                               DBUS_TYPE_INT32, &y_dbus, DBUS_TYPE_INVALID))
     {
       g_warning ("GetPosition failed: %s", error.message);
@@ -146,7 +146,7 @@ atspi_plug_component_get_size (AtkComponent *component,
   dbus_message_unref (message);
   if (!reply)
     return;
-  if (!dbus_message_get_args (reply, &error, DBUS_TYPE_INT32, &width_dbus,
+  if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_INT32, &width_dbus,
                               DBUS_TYPE_INT32, &height_dbus, DBUS_TYPE_INVALID))
     {
       g_warning ("GetSize failed: %s", error.message);
@@ -173,11 +173,8 @@ impl_Embedded (DBusConnection *bus,
     {
       return droute_invalid_arguments_error (message);
     }
-  id = g_object_get_data (G_OBJECT (object), "dbus-plug-parent");
-  if (id)
-    g_free (id);
   id = g_strconcat (dbus_message_get_sender (message), ":", path, NULL);
-  g_object_set_data (G_OBJECT (object), "dbus-plug-parent", id);
+  g_object_set_data_full (G_OBJECT (object), "dbus-plug-parent", id, (GDestroyNotify)g_free);
 
   if (ATK_IS_COMPONENT (object))
     {
@@ -187,6 +184,12 @@ impl_Embedded (DBusConnection *bus,
       iface->get_size = atspi_plug_component_get_size;
       iface->get_position = atspi_plug_component_get_position;
     }
+
+  /* Retrieve some info about the children, if they exist, when
+     embedding the plug to ensure the a11y subtree is generated.
+     https://bugzilla.gnome.org/show_bug.cgi?id=663876 */
+  atk_object_get_n_accessible_children (object);
+
   return dbus_message_new_method_return (message);
 }
 
@@ -199,7 +202,7 @@ void
 spi_initialize_socket (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_SOCKET,
+                             ATSPI_DBUS_INTERFACE_SOCKET,
                              NULL, /* spi_org_a11y_atspi_Socket,        */
                              methods, NULL);
 };