summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-09-03 09:41:35 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-09-03 09:42:31 +0100
commit9544c874289afd6f6eba894bde3c806ca22dda7b (patch)
tree1a50a4cd5fb7070adf3dc908bcd1505ad7f10b0d
parent5065c9d0c2c4202ef4e2fd7eed650681fc51bf27 (diff)
edje - calc - handle swallow disappearing mid-calc due to callabcks
callbacks attached to move/resize etc. can change a swallow and .. well.. i hit a crash where it happens. so handle this case. @fix
-rw-r--r--src/lib/edje/edje_calc.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index eed9215b23..221e7b645d 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -4761,7 +4761,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4761 } 4761 }
4762 if (!ed->calc_only) 4762 if (!ed->calc_only)
4763 { 4763 {
4764 Evas_Object *mo; 4764 Evas_Object *mo = NULL;
4765 4765
4766 /* Common move, resize and color_set for all part. */ 4766 /* Common move, resize and color_set for all part. */
4767 switch (ep->part->type) 4767 switch (ep->part->type)
@@ -4945,12 +4945,17 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4945 4945
4946 if (ep->part->type == EDJE_PART_TYPE_GROUP) 4946 if (ep->part->type == EDJE_PART_TYPE_GROUP)
4947 vis = evas_object_visible_get(ed->obj); 4947 vis = evas_object_visible_get(ed->obj);
4948 efl_gfx_entity_position_set(ep->typedata.swallow->swallowed_object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y)); 4948 if (ep->typedata.swallow)
4949 efl_gfx_entity_size_set(ep->typedata.swallow->swallowed_object, EINA_SIZE2D(pf->final.w, pf->final.h)); 4949 efl_gfx_entity_position_set(ep->typedata.swallow->swallowed_object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
4950 efl_gfx_entity_visible_set(ep->typedata.swallow->swallowed_object, vis); 4950 if (ep->typedata.swallow)
4951 efl_gfx_entity_size_set(ep->typedata.swallow->swallowed_object, EINA_SIZE2D(pf->final.w, pf->final.h));
4952 if (ep->typedata.swallow)
4953 efl_gfx_entity_visible_set(ep->typedata.swallow->swallowed_object, vis);
4951 } 4954 }
4952 else evas_object_hide(ep->typedata.swallow->swallowed_object); 4955 else if (ep->typedata.swallow)
4953 mo = ep->typedata.swallow->swallowed_object; 4956 evas_object_hide(ep->typedata.swallow->swallowed_object);
4957 if (ep->typedata.swallow)
4958 mo = ep->typedata.swallow->swallowed_object;
4954 } 4959 }
4955 else mo = ep->object; 4960 else mo = ep->object;
4956 if (ep->part->type != EDJE_PART_TYPE_SPACER) 4961 if (ep->part->type != EDJE_PART_TYPE_SPACER)