mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
clutter/effect: Override ClutterActorMeta.set_enabled
Instead of using GObject.notify to queue a redraw, use the new ClutterActorMeta.set_enabled vfunc. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1187
This commit is contained in:
parent
ac52631e8a
commit
7660ca2579
@ -230,28 +230,26 @@ clutter_effect_real_pick (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_effect_notify (GObject *gobject,
|
clutter_effect_set_enabled (ClutterActorMeta *meta,
|
||||||
GParamSpec *pspec)
|
gboolean is_enabled)
|
||||||
{
|
{
|
||||||
if (strcmp (pspec->name, "enabled") == 0)
|
ClutterActorMetaClass *parent_class =
|
||||||
{
|
CLUTTER_ACTOR_META_CLASS (clutter_effect_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);
|
||||||
clutter_actor_queue_redraw (actor);
|
if (actor)
|
||||||
}
|
clutter_actor_queue_redraw (actor);
|
||||||
|
|
||||||
if (G_OBJECT_CLASS (clutter_effect_parent_class)->notify != NULL)
|
parent_class->set_enabled (meta, is_enabled);
|
||||||
G_OBJECT_CLASS (clutter_effect_parent_class)->notify (gobject, pspec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_effect_class_init (ClutterEffectClass *klass)
|
clutter_effect_class_init (ClutterEffectClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
ClutterActorMetaClass *actor_meta_class = CLUTTER_ACTOR_META_CLASS (klass);
|
||||||
|
|
||||||
gobject_class->notify = clutter_effect_notify;
|
actor_meta_class->set_enabled = clutter_effect_set_enabled;
|
||||||
|
|
||||||
klass->pre_paint = clutter_effect_real_pre_paint;
|
klass->pre_paint = clutter_effect_real_pre_paint;
|
||||||
klass->post_paint = clutter_effect_real_post_paint;
|
klass->post_paint = clutter_effect_real_post_paint;
|
||||||
|
Loading…
Reference in New Issue
Block a user