mirror of
https://github.com/brl/mutter.git
synced 2024-11-11 00:26:40 -05:00
surface-actor: Move work out of _new constructor
If we want to have any chance at creating subclasses of MetaSurfaceActor, we can't do work in the constructor...
This commit is contained in:
parent
309f78ff52
commit
1481836ed6
@ -67,21 +67,8 @@ meta_surface_actor_init (MetaSurfaceActor *self)
|
||||
META_TYPE_SURFACE_ACTOR,
|
||||
MetaSurfaceActorPrivate);
|
||||
|
||||
priv->texture = NULL;
|
||||
}
|
||||
|
||||
MetaSurfaceActor *
|
||||
meta_surface_actor_new (void)
|
||||
{
|
||||
MetaSurfaceActor *self = g_object_new (META_TYPE_SURFACE_ACTOR, NULL);
|
||||
MetaShapedTexture *stex;
|
||||
|
||||
stex = META_SHAPED_TEXTURE (meta_shaped_texture_new ());
|
||||
self->priv->texture = stex;
|
||||
|
||||
clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (stex));
|
||||
|
||||
return self;
|
||||
priv->texture = META_SHAPED_TEXTURE (meta_shaped_texture_new ());
|
||||
clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->texture));
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
@ -183,3 +170,9 @@ meta_surface_actor_set_opaque_region (MetaSurfaceActor *self,
|
||||
{
|
||||
meta_shaped_texture_set_opaque_region (self->priv->texture, region);
|
||||
}
|
||||
|
||||
MetaSurfaceActor *
|
||||
meta_surface_actor_new (void)
|
||||
{
|
||||
return g_object_new (META_TYPE_SURFACE_ACTOR, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user