mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
clutter: Introduce pick contexts
Just as with painting, add a pick context that carries pick related temporary state when doing actor picking. It is currently unused, and will at least at first still carry around a framebuffer to deal track view transforms etc. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
e8e5ccf82d
commit
cb9d6b79ef
@ -131,7 +131,8 @@ meta_surface_actor_paint (ClutterActor *actor,
|
||||
}
|
||||
|
||||
static void
|
||||
meta_surface_actor_pick (ClutterActor *actor)
|
||||
meta_surface_actor_pick (ClutterActor *actor,
|
||||
ClutterPickContext *pick_context)
|
||||
{
|
||||
MetaSurfaceActor *self = META_SURFACE_ACTOR (actor);
|
||||
MetaSurfaceActorPrivate *priv =
|
||||
@ -144,7 +145,12 @@ meta_surface_actor_pick (ClutterActor *actor)
|
||||
|
||||
/* If there is no region then use the regular pick */
|
||||
if (priv->input_region == NULL)
|
||||
CLUTTER_ACTOR_CLASS (meta_surface_actor_parent_class)->pick (actor);
|
||||
{
|
||||
ClutterActorClass *actor_class =
|
||||
CLUTTER_ACTOR_CLASS (meta_surface_actor_parent_class);
|
||||
|
||||
actor_class->pick (actor, pick_context);
|
||||
}
|
||||
else
|
||||
{
|
||||
int n_rects;
|
||||
@ -163,14 +169,14 @@ meta_surface_actor_pick (ClutterActor *actor)
|
||||
box.y1 = rect.y;
|
||||
box.x2 = rect.x + rect.width;
|
||||
box.y2 = rect.y + rect.height;
|
||||
clutter_actor_pick_box (actor, &box);
|
||||
clutter_actor_pick_box (actor, pick_context, &box);
|
||||
}
|
||||
}
|
||||
|
||||
clutter_actor_iter_init (&iter, actor);
|
||||
|
||||
while (clutter_actor_iter_next (&iter, &child))
|
||||
clutter_actor_pick (child);
|
||||
clutter_actor_pick (child, pick_context);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Reference in New Issue
Block a user