handle compositor animation race condition when changing effects

this is more of an academic case than any existing scenario, but
it's possible that an effect may be stopped by something attempting
to trigger another effect during the animation
This commit is contained in:
Mike Blumenkrantz 2015-06-20 12:31:32 -04:00
parent dc444f5489
commit 2936a4ccfe
1 changed files with 10 additions and 0 deletions

View File

@ -3612,10 +3612,20 @@ e_comp_object_effect_set(Evas_Object *obj, const char *effect)
if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", buf)) if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", buf))
if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none")) if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none"))
{ {
if (cw->effect_running)
{
if (!e_comp_object_effect_stop(obj, evas_object_data_get(cw->effect_obj, "_e_comp.end_cb")))
return EINA_FALSE;
}
cw->effect_set = EINA_FALSE; cw->effect_set = EINA_FALSE;
return cw->effect_set; return cw->effect_set;
} }
} }
if (cw->effect_running)
{
if (!e_comp_object_effect_stop(obj, evas_object_data_get(cw->effect_obj, "_e_comp.end_cb")))
return EINA_FALSE;
}
edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj); edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj);
if (cw->effect_clip) if (cw->effect_clip)
{ {