diff --git a/clutter/cally/cally-actor-private.h b/clutter/cally/cally-actor-private.h index e3d6b8dd2..7e9927868 100644 --- a/clutter/cally/cally-actor-private.h +++ b/clutter/cally/cally-actor-private.h @@ -35,4 +35,8 @@ #define CALLY_GET_CLUTTER_ACTOR(cally_object) \ (CLUTTER_ACTOR (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (cally_object)))) +void _cally_actor_get_top_level_origin (ClutterActor *actor, + gint *x, + gint *y); + #endif /* __CALLY_ACTOR_PRIVATE_H__ */ diff --git a/clutter/cally/cally-actor.c b/clutter/cally/cally-actor.c index 3365d1034..0302fd2ec 100644 --- a/clutter/cally/cally-actor.c +++ b/clutter/cally/cally-actor.c @@ -186,9 +186,6 @@ static void cally_actor_remove_focus_handler (AtkComponent *component, static void cally_actor_focus_event (AtkObject *obj, gboolean focus_in); static gboolean _is_actor_on_screen (ClutterActor *actor); -static void _get_top_level_origin (ClutterActor *actor, - gint *x, - gint *y); /* AtkAction.h */ static void cally_actor_action_interface_init (AtkActionIface *iface); @@ -809,7 +806,7 @@ cally_actor_get_extents (AtkComponent *component, if (coord_type == ATK_XY_SCREEN) { - _get_top_level_origin (actor, &top_level_x, &top_level_y); + _cally_actor_get_top_level_origin (actor, &top_level_x, &top_level_y); *x += top_level_x; *y += top_level_y; @@ -914,14 +911,14 @@ _is_actor_on_screen (ClutterActor *actor) * required * */ -static void -_get_top_level_origin (ClutterActor *actor, - gint *x, - gint *y) +void +_cally_actor_get_top_level_origin (ClutterActor *actor, + gint *xp, + gint *yp) { /* default values */ - *x = 0; - *y = 0; + gint x = 0; + gint y = 0; #ifdef HAVE_CLUTTER_GLX { @@ -941,7 +938,7 @@ _get_top_level_origin (ClutterActor *actor, stage_window = clutter_x11_get_stage_window (CLUTTER_STAGE (stage)); return_val = XTranslateCoordinates (display, stage_window, root_window, - 0, 0, x, y, + 0, 0, &x, &y, &child); if (!return_val) @@ -962,6 +959,12 @@ _get_top_level_origin (ClutterActor *actor, } } #endif + + if (xp) + *xp = x; + + if (yp) + *yp = y; } /* AtkAction implementation */