clutter/actor: Remove color from the pick virtual function

It's unused since commit 14c706e51.

**ABI break**

https://gitlab.gnome.org/GNOME/mutter/merge_requests/851
This commit is contained in:
Daniel van Vugt 2019-10-14 15:10:51 +08:00 committed by Georges Basile Stavracas Neto
parent 8c89ea5f0a
commit e82a657cd9
5 changed files with 10 additions and 25 deletions

View File

@ -2345,8 +2345,7 @@ _clutter_actor_rerealize (ClutterActor *self,
} }
static void static void
clutter_actor_real_pick (ClutterActor *self, clutter_actor_real_pick (ClutterActor *self)
const ClutterColor *color)
{ {
if (clutter_actor_should_pick_paint (self)) if (clutter_actor_should_pick_paint (self))
{ {
@ -4163,22 +4162,15 @@ clutter_actor_continue_paint (ClutterActor *self)
} }
else else
{ {
ClutterColor col = { 0, };
/* The actor will log a silhouette of itself to the stage pick log. /* The actor will log a silhouette of itself to the stage pick log.
* Note that the picking color is no longer used as the "log" instead
* keeps a weak pointer to the actor itself. But we keep the color
* parameter for now so as to maintain ABI compatibility. The color
* parameter can be removed when someone feels like breaking the ABI
* along with gnome-shell.
* *
* XXX:2.0 - Call the pick() virtual directly * XXX:2.0 - Call the pick() virtual directly
*/ */
if (g_signal_has_handler_pending (self, actor_signals[PICK], if (g_signal_has_handler_pending (self, actor_signals[PICK],
0, TRUE)) 0, TRUE))
g_signal_emit (self, actor_signals[PICK], 0, &col); g_signal_emit (self, actor_signals[PICK], 0);
else else
CLUTTER_ACTOR_GET_CLASS (self)->pick (self, &col); CLUTTER_ACTOR_GET_CLASS (self)->pick (self);
} }
} }
else else
@ -8537,12 +8529,10 @@ clutter_actor_class_init (ClutterActorClass *klass)
/** /**
* ClutterActor::pick: * ClutterActor::pick:
* @actor: the #ClutterActor that received the signal * @actor: the #ClutterActor that received the signal
* @color: the #ClutterColor to be used when picking
* *
* The ::pick signal is emitted each time an actor is being painted * The ::pick signal is emitted each time an actor is being painted
* in "pick mode". The pick mode is used to identify the actor during * in "pick mode". The pick mode is used to identify the actor during
* the event handling phase, or by clutter_stage_get_actor_at_pos(). * the event handling phase, or by clutter_stage_get_actor_at_pos().
* The actor should paint its shape using the passed @pick_color.
* *
* Subclasses of #ClutterActor should override the class signal handler * Subclasses of #ClutterActor should override the class signal handler
* and paint themselves in that function. * and paint themselves in that function.
@ -8560,8 +8550,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED, G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
G_STRUCT_OFFSET (ClutterActorClass, pick), G_STRUCT_OFFSET (ClutterActorClass, pick),
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_NONE, 0);
CLUTTER_TYPE_COLOR | G_SIGNAL_TYPE_STATIC_SCOPE);
/** /**
* ClutterActor::allocation-changed: * ClutterActor::allocation-changed:

View File

@ -233,8 +233,7 @@ struct _ClutterActorClass
ClutterActor *old_parent); ClutterActor *old_parent);
void (* destroy) (ClutterActor *self); void (* destroy) (ClutterActor *self);
void (* pick) (ClutterActor *actor, void (* pick) (ClutterActor *actor);
const ClutterColor *color);
gboolean (* queue_redraw) (ClutterActor *actor, gboolean (* queue_redraw) (ClutterActor *actor,
ClutterActor *leaf_that_queued, ClutterActor *leaf_that_queued,

View File

@ -1000,8 +1000,7 @@ clutter_stage_paint (ClutterActor *self)
} }
static void static void
clutter_stage_pick (ClutterActor *self, clutter_stage_pick (ClutterActor *self)
const ClutterColor *color)
{ {
ClutterActorIter iter; ClutterActorIter iter;
ClutterActor *child; ClutterActor *child;

View File

@ -291,13 +291,12 @@ clutter_group_real_paint (ClutterActor *actor)
} }
static void static void
clutter_group_real_pick (ClutterActor *actor, clutter_group_real_pick (ClutterActor *actor)
const ClutterColor *pick)
{ {
ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv; ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv;
/* Chain up so we get a bounding box pained (if we are reactive) */ /* Chain up so we get a bounding box pained (if we are reactive) */
CLUTTER_ACTOR_CLASS (clutter_group_parent_class)->pick (actor, pick); CLUTTER_ACTOR_CLASS (clutter_group_parent_class)->pick (actor);
g_list_foreach (priv->children, (GFunc) clutter_actor_paint, NULL); g_list_foreach (priv->children, (GFunc) clutter_actor_paint, NULL);
} }

View File

@ -129,8 +129,7 @@ meta_surface_actor_paint (ClutterActor *actor)
} }
static void static void
meta_surface_actor_pick (ClutterActor *actor, meta_surface_actor_pick (ClutterActor *actor)
const ClutterColor *color)
{ {
MetaSurfaceActor *self = META_SURFACE_ACTOR (actor); MetaSurfaceActor *self = META_SURFACE_ACTOR (actor);
MetaSurfaceActorPrivate *priv = MetaSurfaceActorPrivate *priv =
@ -143,7 +142,7 @@ meta_surface_actor_pick (ClutterActor *actor,
/* If there is no region then use the regular pick */ /* If there is no region then use the regular pick */
if (priv->input_region == NULL) if (priv->input_region == NULL)
CLUTTER_ACTOR_CLASS (meta_surface_actor_parent_class)->pick (actor, color); CLUTTER_ACTOR_CLASS (meta_surface_actor_parent_class)->pick (actor);
else else
{ {
int n_rects; int n_rects;