Applied patch from bug #871
* clutter/x11/clutter-backend-x11.c (clutter_backend_x11_dispose): Call g_slist_foreach instead of iterating over the stage_manager list manually when deleting stages. Otherwise the 'next' pointer of the list node can get corrupted when the actor removes itself from the list. * clutter/clutter-stage.c (clutter_stage_dispose): Call clutter_actor_unrealize in the dispose handler. This fixes problems where the dispose handler for the ClutterStageWrapper can't deselect the GL context until the stage is unrealized.
This commit is contained in:
parent
f16833ea6d
commit
b4ab8b63a1
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
|||||||
|
2008-04-09 Neil Roberts <neil@o-hand.com>
|
||||||
|
|
||||||
|
Applied patch from bug #871
|
||||||
|
|
||||||
|
* clutter/x11/clutter-backend-x11.c (clutter_backend_x11_dispose):
|
||||||
|
Call g_slist_foreach instead of iterating over the stage_manager
|
||||||
|
list manually when deleting stages. Otherwise the 'next' pointer
|
||||||
|
of the list node can get corrupted when the actor removes itself
|
||||||
|
from the list.
|
||||||
|
|
||||||
|
* clutter/clutter-stage.c (clutter_stage_dispose): Call
|
||||||
|
clutter_actor_unrealize in the dispose handler. This fixes
|
||||||
|
problems where the dispose handler for the ClutterStageWrapper
|
||||||
|
can't deselect the GL context until the stage is unrealized.
|
||||||
|
|
||||||
2008-04-04 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-04-04 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-backend.c: Add more debug messages
|
* clutter/clutter-backend.c: Add more debug messages
|
||||||
|
@ -363,6 +363,8 @@ clutter_stage_dispose (GObject *object)
|
|||||||
priv->update_idle = 0;
|
priv->update_idle = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clutter_actor_unrealize (CLUTTER_ACTOR (object));
|
||||||
|
|
||||||
_clutter_stage_manager_remove_stage (stage_manager, stage);
|
_clutter_stage_manager_remove_stage (stage_manager, stage);
|
||||||
|
|
||||||
if (priv->impl)
|
if (priv->impl)
|
||||||
|
@ -242,18 +242,17 @@ clutter_backend_x11_dispose (GObject *gobject)
|
|||||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (gobject);
|
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (gobject);
|
||||||
ClutterMainContext *context;
|
ClutterMainContext *context;
|
||||||
ClutterStageManager *stage_manager;
|
ClutterStageManager *stage_manager;
|
||||||
GSList *l;
|
|
||||||
|
|
||||||
CLUTTER_NOTE (BACKEND, "Disposing the of stages");
|
CLUTTER_NOTE (BACKEND, "Disposing the of stages");
|
||||||
|
|
||||||
context = clutter_context_get_default ();
|
context = clutter_context_get_default ();
|
||||||
stage_manager = context->stage_manager;
|
stage_manager = context->stage_manager;
|
||||||
|
|
||||||
for (l = stage_manager->stages; l; l = l->next)
|
/* Destroy all of the stages. g_slist_foreach is used because the
|
||||||
{
|
finalizer for the stages will remove the stage from the
|
||||||
ClutterActor *stage = CLUTTER_ACTOR (l->data);
|
stage_manager's list and g_slist_foreach has some basic
|
||||||
clutter_actor_destroy (stage);
|
protection against this */
|
||||||
}
|
g_slist_foreach (stage_manager->stages, (GFunc) clutter_actor_destroy, NULL);
|
||||||
|
|
||||||
CLUTTER_NOTE (BACKEND, "Removing the event source");
|
CLUTTER_NOTE (BACKEND, "Removing the event source");
|
||||||
_clutter_backend_x11_events_uninit (CLUTTER_BACKEND (backend_x11));
|
_clutter_backend_x11_events_uninit (CLUTTER_BACKEND (backend_x11));
|
||||||
|
Loading…
Reference in New Issue
Block a user