mirror of
https://github.com/brl/mutter.git
synced 2025-03-31 07:33:46 +00:00
actor: don't queue_redraw actors not descended from stage
This makes clutter_actor_queue_redraw simply bail out early if the actor isn't a descendant of a ClutterStage since the request isn't meaningful and it avoids a crash when trying to queue a clipped redraw against the stage to clear the actors old location.
This commit is contained in:
parent
b77d9a6d2c
commit
bfacca3011
@ -4930,11 +4930,17 @@ clutter_actor_queue_redraw (ClutterActor *self)
|
|||||||
ClutterActorPrivate *priv;
|
ClutterActorPrivate *priv;
|
||||||
const ClutterPaintVolume *pv;
|
const ClutterPaintVolume *pv;
|
||||||
gboolean clipped;
|
gboolean clipped;
|
||||||
|
ClutterActor *stage;
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||||
|
|
||||||
priv = self->priv;
|
priv = self->priv;
|
||||||
|
|
||||||
|
/* Ignore queuing a redraw for actors not descended from a stage */
|
||||||
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
if (!stage)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Don't clip this redraw if we don't know what position we had for
|
/* Don't clip this redraw if we don't know what position we had for
|
||||||
* the previous redraw since we don't know where to set the clip so
|
* the previous redraw since we don't know where to set the clip so
|
||||||
* it will clear the actor as it is currently. */
|
* it will clear the actor as it is currently. */
|
||||||
@ -4943,7 +4949,6 @@ clutter_actor_queue_redraw (ClutterActor *self)
|
|||||||
pv = clutter_actor_get_paint_volume (self);
|
pv = clutter_actor_get_paint_volume (self);
|
||||||
if (pv)
|
if (pv)
|
||||||
{
|
{
|
||||||
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
|
|
||||||
ClutterPaintVolume stage_pv;
|
ClutterPaintVolume stage_pv;
|
||||||
_clutter_paint_volume_init_static (stage, &stage_pv);
|
_clutter_paint_volume_init_static (stage, &stage_pv);
|
||||||
ClutterActorBox *box = &priv->last_paint_box;
|
ClutterActorBox *box = &priv->last_paint_box;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user