mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
constraint: Queue a relayout on :enabled changes
ClutterConstraint should queue a relayout if the :enabled property of its parent class ClutterActorMeta changes. http://bugzilla.clutter-project.org/show_bug.cgi?id=2587
This commit is contained in:
parent
0c83e6a59a
commit
bd8b09edda
@ -137,6 +137,8 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "clutter-constraint.h"
|
||||
|
||||
#include "clutter-actor.h"
|
||||
@ -153,9 +155,30 @@ constraint_update_allocation (ClutterConstraint *constraint,
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_constraint_notify (GObject *gobject,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
if (strcmp (pspec->name, "enabled") == 0)
|
||||
{
|
||||
ClutterActorMeta *meta = CLUTTER_ACTOR_META (gobject);
|
||||
ClutterActor *actor = clutter_actor_meta_get_actor (meta);
|
||||
|
||||
if (actor != NULL)
|
||||
clutter_actor_queue_relayout (actor);
|
||||
}
|
||||
|
||||
if (G_OBJECT_CLASS (clutter_constraint_parent_class)->notify != NULL)
|
||||
G_OBJECT_CLASS (clutter_constraint_parent_class)->notify (gobject, pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_constraint_class_init (ClutterConstraintClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gobject_class->notify = clutter_constraint_notify;
|
||||
|
||||
klass->update_allocation = constraint_update_allocation;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user