Applied patch from bug #947
authorNeil Roberts <neil@openedhand.com>
Tue, 3 Jun 2008 20:15:11 +0000 (20:15 +0000)
committerNeil Roberts <neil@openedhand.com>
Tue, 3 Jun 2008 20:15:11 +0000 (20:15 +0000)
commitb887bddbb17c6d08292537171be81e98d4d0a476
treefa375e7dbc5e3f9da9867ae131ff9affede611f6
parent437fa9239f501b950a10ab8ae3f2b87710826bb7
Applied patch from bug #947

* clutter/clutter-stage.c (clutter_stage_get_default): Don't grab
the floating reference when creating the default stage. The stage
manager will take a reference to it so it will behave as any other
stage.
(clutter_stage_new): Don't take the floating reference to the new
stage but let the stage manager keep it instead.

* clutter/clutter-stage-manager.c
(_clutter_stage_manager_add_stage): Take a reference to the stage
when it is added to the list.
(_clutter_stage_manager_remove_stage): Unref the stage when it is
removed from the list.
(clutter_stage_manager_dispose): Keep track of the 'next' pointer
as a separate variable so we can cope when the stage being
destroyed removes itself from the list as the list is being
iterated.

* clutter/clutter-actor.c (clutter_actor_destroy): Take a
reference at the beginning of the function even if there is no
parent container so that overall the reference count is not
changed when the actor is unref'd again at the bottom of the
function. Previously it would have a net effect of leaving the
reference count alone unless it is a top level actor in which case
it would unref it.
ChangeLog
clutter/clutter-actor.c
clutter/clutter-stage-manager.c
clutter/clutter-stage.c