cally: Remove useless cally_actor_get_top_level_origin
Does nothing... Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3458>
This commit is contained in:
parent
5dc92aa134
commit
4d7dfb08c9
@ -33,7 +33,3 @@
|
||||
*/
|
||||
#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);
|
||||
|
@ -647,7 +647,6 @@ cally_actor_get_extents (AtkComponent *component,
|
||||
{
|
||||
CallyActor *cally_actor = NULL;
|
||||
ClutterActor *actor = NULL;
|
||||
gint top_level_x, top_level_y;
|
||||
gfloat f_width, f_height;
|
||||
graphene_point3d_t verts[4];
|
||||
ClutterActor *stage = NULL;
|
||||
@ -673,22 +672,6 @@ cally_actor_get_extents (AtkComponent *component,
|
||||
*y = verts[0].y;
|
||||
*width = ceilf (f_width);
|
||||
*height = ceilf (f_height);
|
||||
|
||||
/* In the ATK_XY_WINDOW case, we consider the stage as the
|
||||
* "top-level-window"
|
||||
*
|
||||
* http://library.gnome.org/devel/atk/stable/AtkUtil.html#AtkCoordType
|
||||
*/
|
||||
|
||||
if (coord_type == ATK_XY_SCREEN)
|
||||
{
|
||||
_cally_actor_get_top_level_origin (actor, &top_level_x, &top_level_y);
|
||||
|
||||
*x += top_level_x;
|
||||
*y += top_level_y;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static gint
|
||||
@ -725,25 +708,6 @@ cally_actor_grab_focus (AtkComponent *component)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* This gets the top level origin, it is, the position of the stage in
|
||||
* the global screen. You can see it as the absolute display position
|
||||
* of the stage. This is 0,0 for a compositor.
|
||||
*/
|
||||
void
|
||||
_cally_actor_get_top_level_origin (ClutterActor *actor,
|
||||
gint *xp,
|
||||
gint *yp)
|
||||
{
|
||||
/* default values */
|
||||
if (xp)
|
||||
*xp = 0;
|
||||
|
||||
if (yp)
|
||||
*yp = 0;
|
||||
}
|
||||
|
||||
/* AtkAction implementation */
|
||||
static void
|
||||
cally_actor_action_interface_init (AtkActionIface *iface)
|
||||
|
@ -1423,7 +1423,7 @@ static void cally_text_get_character_extents (AtkText *text,
|
||||
ClutterActor *actor = NULL;
|
||||
ClutterText *clutter_text = NULL;
|
||||
gint x = 0, y = 0, width = 0, height = 0;
|
||||
gint index, x_window, y_window, x_toplevel, y_toplevel;
|
||||
gint index, x_window, y_window;
|
||||
gint x_layout, y_layout;
|
||||
PangoLayout *layout;
|
||||
PangoRectangle extents;
|
||||
@ -1460,13 +1460,6 @@ static void cally_text_get_character_extents (AtkText *text,
|
||||
width = extents.width / PANGO_SCALE;
|
||||
height = extents.height / PANGO_SCALE;
|
||||
|
||||
if (coords == ATK_XY_SCREEN)
|
||||
{
|
||||
_cally_actor_get_top_level_origin (actor, &x_toplevel, &y_toplevel);
|
||||
x += x_toplevel;
|
||||
y += y_toplevel;
|
||||
}
|
||||
|
||||
done:
|
||||
if (widthp)
|
||||
*widthp = width;
|
||||
@ -2281,7 +2274,7 @@ _cally_misc_get_index_at_point (ClutterText *clutter_text,
|
||||
gint y,
|
||||
AtkCoordType coords)
|
||||
{
|
||||
gint index, x_window, y_window, x_toplevel, y_toplevel;
|
||||
gint index, x_window, y_window;
|
||||
gint x_temp, y_temp;
|
||||
gboolean ret;
|
||||
graphene_point3d_t verts[4];
|
||||
@ -2297,14 +2290,6 @@ _cally_misc_get_index_at_point (ClutterText *clutter_text,
|
||||
x_temp = x - x_layout - x_window;
|
||||
y_temp = y - y_layout - y_window;
|
||||
|
||||
if (coords == ATK_XY_SCREEN)
|
||||
{
|
||||
_cally_actor_get_top_level_origin (CLUTTER_ACTOR (clutter_text), &x_toplevel,
|
||||
&y_toplevel);
|
||||
x_temp -= x_toplevel;
|
||||
y_temp -= y_toplevel;
|
||||
}
|
||||
|
||||
layout = clutter_text_get_layout (clutter_text);
|
||||
ret = pango_layout_xy_to_index (layout,
|
||||
x_temp * PANGO_SCALE,
|
||||
|
Loading…
Reference in New Issue
Block a user