diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/lib/edje/edje_calc.c | 6 | ||||
-rw-r--r-- | src/lib/edje/edje_private.h | 1 | ||||
-rw-r--r-- | src/lib/edje/edje_smart.c | 59 |
5 files changed, 40 insertions, 31 deletions
@@ -1,3 +1,7 @@ +2013-11-21 ChunEon Park (Hermet) + + * Edje: Fix to update map-enabled part when the edje object is moved. + 2013-11-20 Cedric Bail * Eina: Fix a possible race condition during eina_file_close. @@ -437,6 +437,7 @@ Fixes: - Fixed memory leak in the edje map color transition. - Add null checking for name of anchor and item in geometry get functions. - Fix use of eina_hash_pointer to actually look at the pointer value. + - Fix to update map-enabled part when the edje object is moved. * Efreet: - Fix desktop command parsing of https. diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index b6816ee15..6f98455c7 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -650,7 +650,6 @@ _edje_recalc_do(Edje *ed) need_calc = evas_object_smart_need_recalculate_get(ed->obj); evas_object_smart_need_recalculate_set(ed->obj, 0); if (!ed->dirty) return; - ed->have_mapped_part = EINA_FALSE; ed->dirty = EINA_FALSE; ed->state++; for (i = 0; i < ed->table_parts_size; i++) @@ -3353,6 +3352,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta (statep1 >= ep->param1.state) || proxy_invalidate || state || + (ep->map_on && ed->have_mapped_part) || ((ep->part->type == EDJE_PART_TYPE_TEXT || ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && ed->text_part_change)) @@ -3421,6 +3421,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta (statep2 >= ep->param2->state) || proxy_invalidate || state || + (ep->map_on && ed->have_mapped_part) || ((ep->part->type == EDJE_PART_TYPE_TEXT || ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && ed->text_part_change)) @@ -3894,6 +3895,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta static Evas_Map *map = NULL; ed->have_mapped_part = EINA_TRUE; + ep->map_on = EINA_TRUE; // create map and populate with part geometry if (!map) map = evas_map_new(4); @@ -3915,6 +3917,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta } else { + ep->map_on = EINA_FALSE; + if (ep->nested_smart) { /* Cancel map of smart obj holding nested parts */ eo_do(ep->nested_smart, diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index b6e0db909..bfcc9b761 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -1594,6 +1594,7 @@ struct _Edje_Real_Part #ifdef EDJE_CALC_CACHE Eina_Bool invalidate : 1; // 0 #endif + Eina_Bool map_on : 1; // 0 }; // 128 // WITH EDJE_CALC_CACHE: 407 diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index d4c095e3f..7fb79a86e 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -151,6 +151,7 @@ _edje_smart_move(Eo *obj EINA_UNUSED, void *_pd, va_list *list) Evas_Coord x = va_arg(*list, Evas_Coord); Evas_Coord y = va_arg(*list, Evas_Coord); Edje *ed = _pd; + unsigned int i; if ((ed->x == x) && (ed->y == y)) return; ed->x = x; @@ -168,43 +169,41 @@ _edje_smart_move(Eo *obj EINA_UNUSED, void *_pd, va_list *list) return; } - if (ed->have_mapped_part) + for (i = 0; i < ed->table_parts_size; i++) { - ed->dirty = EINA_TRUE; - _edje_recalc_do(ed); - } - else - { - unsigned int i; + Edje_Real_Part *ep; - for (i = 0; i < ed->table_parts_size; i++) + ep = ed->table_parts[i]; + if ((ep->type == EDJE_RP_TYPE_TEXT) && (ep->typedata.text)) { - Edje_Real_Part *ep; - - ep = ed->table_parts[i]; - if ((ep->type == EDJE_RP_TYPE_TEXT) && (ep->typedata.text)) - { - evas_object_move(ep->object, - ed->x + ep->x + ep->typedata.text->offset.x, - ed->y + ep->y + ep->typedata.text->offset.y); - } - else + evas_object_move(ep->object, + ed->x + ep->x + ep->typedata.text->offset.x, + ed->y + ep->y + ep->typedata.text->offset.y); + } + else + { + evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y); + if ((ep->type == EDJE_RP_TYPE_SWALLOW) && + (ep->typedata.swallow)) { - evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y); - if ((ep->type == EDJE_RP_TYPE_SWALLOW) && - (ep->typedata.swallow)) - { - if (ep->typedata.swallow->swallowed_object) - evas_object_move - (ep->typedata.swallow->swallowed_object, - ed->x + ep->x, - ed->y + ep->y); - } + if (ep->typedata.swallow->swallowed_object) + evas_object_move + (ep->typedata.swallow->swallowed_object, + ed->x + ep->x, + ed->y + ep->y); } - if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) - _edje_entry_real_part_configure(ed, ep); } + if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) + _edje_entry_real_part_configure(ed, ep); } + + if (ed->have_mapped_part) + { + ed->dirty = EINA_TRUE; + _edje_recalc_do(ed); + ed->have_mapped_part = EINA_FALSE; + } + // _edje_emit(ed, "move", NULL); } |