mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 01:48:55 +00:00
actor: Use internal add/remove child in reparent()
Do not use the public API; reparent() used to use unparent() and set_parent(), so we need to maintain the old behaviour.
This commit is contained in:
parent
683657cc30
commit
c760657903
@ -10448,6 +10448,8 @@ clutter_actor_reparent (ClutterActor *self,
|
||||
|
||||
g_object_ref (self);
|
||||
|
||||
if (old_parent != NULL)
|
||||
{
|
||||
/* go through the Container implementation if this is a regular
|
||||
* child and not an internal one
|
||||
*/
|
||||
@ -10459,13 +10461,18 @@ clutter_actor_reparent (ClutterActor *self,
|
||||
clutter_container_remove_actor (parent, self);
|
||||
}
|
||||
else
|
||||
clutter_actor_remove_child (old_parent, self);
|
||||
clutter_actor_remove_child_internal (old_parent, self,
|
||||
REMOVE_CHILD_LEGACY_FLAGS);
|
||||
}
|
||||
|
||||
/* Note, will call set_parent() */
|
||||
if (!CLUTTER_ACTOR_IS_INTERNAL_CHILD (self))
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (new_parent), self);
|
||||
else
|
||||
clutter_actor_add_child (new_parent, self);
|
||||
clutter_actor_add_child_internal (new_parent, self,
|
||||
ADD_CHILD_LEGACY_FLAGS,
|
||||
insert_child_at_depth,
|
||||
NULL);
|
||||
|
||||
/* we emit the ::parent-set signal once */
|
||||
g_signal_emit (self, actor_signals[PARENT_SET], 0, old_parent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user