2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-actor.c (clutter_actor_destroy): Bail out
	if clutter_actor_destroy() was called on the stage: the stage
	is not for the user to destroy.

	* clutter/x11/clutter-backend-x11.c:
	* clutter/eglnative/clutter-backend-egl.c:
	* clutter/sdl/clutter-backend-sdl.c:
	* clutter/osx/clutter-backend-osx.c: Unset the top-level private
	flag on the stage when disposing it, so the backends can safely
	call clutter_actor_destroy().

	* clutter/clutter-private.h: Tweak the private flags accessors,
	to avoid the typecheck.
This commit is contained in:
Emmanuele Bassi
2007-11-23 11:20:14 +00:00
parent 8039922802
commit e57b42ae52
7 changed files with 49 additions and 7 deletions

View File

@@ -24,6 +24,7 @@
#include "clutter-osx.h"
#include "clutter-backend-osx.h"
#include "clutter-stage-osx.h"
#include "../clutter-private.h"
#include <clutter/clutter-debug.h>
#import <AppKit/AppKit.h>
@@ -145,6 +146,7 @@ clutter_backend_osx_dispose (GObject *object)
if (self->stage)
{
CLUTTER_UNSET_PRIVATE_FLAGS (self->stage, CLUTTER_ACTOR_IS_TOPLEVEL);
clutter_actor_destroy (self->stage);
self->stage = NULL;
}