From: sachiel Date: Thu, 28 Jan 2010 20:44:03 +0000 (+0000) Subject: Don't allow recursive clipping X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~1442 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ca2a1d8a4a32db6dfc11df3c3af32faba7ef270;p=profile%2Fivi%2Fedje.git Don't allow recursive clipping git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@45672 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 17d789f..252cb96 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -1924,6 +1924,7 @@ EAPI Eina_Bool edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_to) { Edje_Real_Part *clip; + Evas_Object *o, *oo; GET_RP_OR_RETURN(0); @@ -1954,6 +1955,14 @@ edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_ //printf("Set clip_to for part: %s [to: %s]\n", part, clip_to); clip = _edje_real_part_get(ed, clip_to); if (!clip || !clip->part) return 0; + o = clip->object; + while ((oo = evas_object_clip_get(o))) + { + if (o == rp->object) + return 0; + o = oo; + } + rp->part->clip_to_id = clip->part->id; rp->clip_to = clip;