From 882ad6fbf5df6bbfe4a224fafc98992b37dbc668 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 21 Feb 2017 17:49:44 +0900 Subject: [PATCH] edje: Fix a major issue with recalc loop With the new Efl.Ui.Clock widget, which implements Datetime, most parts are relative to each other, and trigger a near-inifinite recalc of all the parts. Indeed edje was recalculating a part even if it had already calculated it (flag is set). This seemingly simple patch fixes Datetime and probably a lot of other edje widgets. Fixes T4909 @fix --- src/lib/edje/edje_calc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index d52069d..5bb2fbb 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -4244,10 +4244,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta return; } - if ((ep->calculated & FLAG_XY) == FLAG_XY && !state) + EINA_SAFETY_ON_FALSE_RETURN(flags != FLAG_NONE); + if (!state) { - return; + if ((ep->calculated & FLAG_XY) == FLAG_XY) return; + if ((ep->calculated & flags) == flags) return; } + if (ep->calculating & flags) { #if 1 -- 2.7.4