mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
clutter/constraint: Override ClutterActorMeta.set_enabled
Pretty much like the previous commit. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1187
This commit is contained in:
parent
7660ca2579
commit
5b984c1e53
@ -160,28 +160,26 @@ constraint_update_preferred_size (ClutterConstraint *constraint,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_constraint_notify (GObject *gobject,
|
clutter_constraint_set_enabled (ClutterActorMeta *meta,
|
||||||
GParamSpec *pspec)
|
gboolean is_enabled)
|
||||||
{
|
{
|
||||||
if (strcmp (pspec->name, "enabled") == 0)
|
ClutterActorMetaClass *parent_class =
|
||||||
{
|
CLUTTER_ACTOR_META_CLASS (clutter_constraint_parent_class);
|
||||||
ClutterActorMeta *meta = CLUTTER_ACTOR_META (gobject);
|
ClutterActor *actor;
|
||||||
ClutterActor *actor = clutter_actor_meta_get_actor (meta);
|
|
||||||
|
|
||||||
if (actor != NULL)
|
actor = clutter_actor_meta_get_actor (meta);
|
||||||
|
if (actor)
|
||||||
clutter_actor_queue_relayout (actor);
|
clutter_actor_queue_relayout (actor);
|
||||||
}
|
|
||||||
|
|
||||||
if (G_OBJECT_CLASS (clutter_constraint_parent_class)->notify != NULL)
|
parent_class->set_enabled (meta, is_enabled);
|
||||||
G_OBJECT_CLASS (clutter_constraint_parent_class)->notify (gobject, pspec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_constraint_class_init (ClutterConstraintClass *klass)
|
clutter_constraint_class_init (ClutterConstraintClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
ClutterActorMetaClass *actor_meta_class = CLUTTER_ACTOR_META_CLASS (klass);
|
||||||
|
|
||||||
gobject_class->notify = clutter_constraint_notify;
|
actor_meta_class->set_enabled = clutter_constraint_set_enabled;
|
||||||
|
|
||||||
klass->update_allocation = constraint_update_allocation;
|
klass->update_allocation = constraint_update_allocation;
|
||||||
klass->update_preferred_size = constraint_update_preferred_size;
|
klass->update_preferred_size = constraint_update_preferred_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user