Bugfix #1007843 method clean up by ricotz

This commit is contained in:
Garden Gnome 2012-06-03 21:46:04 +01:00
parent feafb53f59
commit 4d29e6bb5b

View File

@ -506,14 +506,13 @@ namespace Gala
void clutter_actor_reparent (Clutter.Actor actor, Clutter.Actor new_parent)
{
Clutter.Actor actor_tmp, old_parent;
if (actor == new_parent) return;
actor_tmp = actor;
old_parent = actor.get_parent ();
old_parent.remove_child (actor);
new_parent.add_child (actor_tmp);
if (actor == new_parent)
return;
actor.ref ();
actor.get_parent ().remove_child (actor);
new_parent.add_child (actor);
actor.unref ();
}
[CCode (cname="clutter_x11_handle_event")]