summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-03-14 14:06:24 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-03-14 14:15:09 +0900
commit3103c551f5e7622e47c4f4ea27a9012f86b8f127 (patch)
tree7922e4794f08c8d8346cc893ac3858bf63c034c1
parentfbe72f6e4bf3813a61fa166635cf5f048d318d08 (diff)
edje: Move prev_description out of ephysics ifdef
prev_description was used when HAVE_EPHYSICS is set, which is the default, but I also added a use in 7072fbc2bfe25881 where the map was not properly reset. This removes an ugly #ifdef and opens the door to other fixes similar to that map one.
-rw-r--r--src/lib/edje/edje_calc.c3
-rw-r--r--src/lib/edje/edje_private.h2
-rw-r--r--src/lib/edje/edje_util.c6
3 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 5bb2fbb50a..6f5e08c17d 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -5450,8 +5450,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5450 5450
5451 if (map_colors_free) _map_colors_free(pf); 5451 if (map_colors_free) _map_colors_free(pf);
5452 5452
5453#ifdef HAVE_EPHYSICS
5454 ep->prev_description = chosen_desc; 5453 ep->prev_description = chosen_desc;
5454#ifdef HAVE_EPHYSICS
5455 if (!ep->body) 5455 if (!ep->body)
5456 { 5456 {
5457#endif 5457#endif
@@ -5461,7 +5461,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5461 ep->h = pf->final.h; 5461 ep->h = pf->final.h;
5462#ifdef HAVE_EPHYSICS 5462#ifdef HAVE_EPHYSICS
5463 } 5463 }
5464
5465#endif 5464#endif
5466 5465
5467 ep->calculated |= flags; 5466 ep->calculated |= flags;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 11243a5459..a849f3034f 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2009,8 +2009,8 @@ struct _Edje_Real_Part
2009 // WITH EDJE_CALC_CACHE: 307 2009 // WITH EDJE_CALC_CACHE: 307
2010 Edje_Running_Program *program; // 4 2010 Edje_Running_Program *program; // 4
2011 Edje_Calc_Params *current; // 4 2011 Edje_Calc_Params *current; // 4
2012#ifdef HAVE_EPHYSICS
2013 Edje_Part_Description_Common *prev_description; // 4 2012 Edje_Part_Description_Common *prev_description; // 4
2013#ifdef HAVE_EPHYSICS
2014 EPhysics_Body *body; // 4 2014 EPhysics_Body *body; // 4
2015 Eina_List *body_faces; // 4 2015 Eina_List *body_faces; // 4
2016#endif 2016#endif
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 3ea970ce3c..b819cc2eca 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -6280,11 +6280,7 @@ _edje_real_part_swallow_clear(Edje *ed, Edje_Real_Part *rp)
6280 (!rp->typedata.swallow)) return; 6280 (!rp->typedata.swallow)) return;
6281 if (!rp->typedata.swallow->swallowed_object) return; 6281 if (!rp->typedata.swallow->swallowed_object) return;
6282 if (rp->chosen_description->map.on || 6282 if (rp->chosen_description->map.on ||
6283 (rp->invalidate 6283 (rp->invalidate && rp->prev_description && rp->prev_description->map.on))
6284#ifdef HAVE_EPHYSICS
6285 && rp->prev_description && rp->prev_description->map.on
6286#endif
6287 ))
6288 { 6284 {
6289 evas_object_map_enable_set(rp->typedata.swallow->swallowed_object, EINA_FALSE); 6285 evas_object_map_enable_set(rp->typedata.swallow->swallowed_object, EINA_FALSE);
6290 } 6286 }