raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3051df7feeb7578157319473bedfd8e4c476fc17

commit 3051df7feeb7578157319473bedfd8e4c476fc17
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Mon Jul 31 17:41:35 2017 +0900

    gadget recalc - if you add a job...del and add again
    
    if you add a job to do things like defer a calc till later in the loop
    (or if later in size calc - it'd be the next loop run after rendering)
    ... then del the previous job and add a new one. why? order of
    operation. if you add job a... because of event a, then add job b,
    because of event b ... if for whatever reason, event a happens again
    and you skip adding job a... job a will run before jbo b, even though
    the LAST event is later and that 2nd event a may relay on event b
    state/calculations. so always del then add to ensure then that job a
    happens ater b if this scenario happens. it just leads to fewer
    surprises and weird issues.
---
 src/bin/e_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c
index c639734cd..5ac7f0101 100644
--- a/src/bin/e_gadget.c
+++ b/src/bin/e_gadget.c
@@ -140,7 +140,7 @@ _site_recalc_job_cb(E_Gadget_Site *zgs)
 static void
 _site_recalc_job(E_Gadget_Site *zgs)
 {
-   if (zgs->calc_job) return;
+   if (zgs->calc_job) ecore_job_del(zgs->calc_job);
    zgs->calc_job = ecore_job_add((Ecore_Cb)_site_recalc_job_cb, zgs);
 }
 

-- 


Reply via email to