Bugfix for keygrab regression (registryd was holding keygrabs after they should have...
[platform/core/uifw/at-spi2-atk.git] / libspi / component.c
index b519286..645dea0 100644 (file)
@@ -38,7 +38,8 @@ get_component_from_servant (PortableServer_Servant servant)
 {
   SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant));
   g_return_val_if_fail (object != NULL, NULL);
-  return ATK_COMPONENT (object->atko);
+  g_return_val_if_fail (ATK_IS_OBJECT(object->gobj), NULL);
+  return ATK_COMPONENT (object->gobj);
 }
 
 /*
@@ -94,13 +95,11 @@ impl_accessibility_component_get_extents (PortableServer_Servant servant,
   Accessibility_BoundingBox retval;
   AtkComponent *component = get_component_from_servant (servant);
 
-  g_return_if_fail (component != NULL);
-
   atk_component_get_extents (component, &ix, &iy, &iw, &ih,
                             (AtkCoordType) coord_type);
 
   retval.x = ix;
-  retval.y = ix;
+  retval.y = iy;
   retval.width = iw;
   retval.height = ih;
 
@@ -218,7 +217,7 @@ spi_component_interface_new (AtkObject *o)
 {
     SpiComponent *retval = g_object_new (SPI_COMPONENT_TYPE, NULL);
 
-    spi_base_construct (SPI_BASE (retval), o);
+    spi_base_construct (SPI_BASE (retval), G_OBJECT(o));
 
     return retval;
 }