edje - Fix to update map enabled part when edje object is moved.
This commit is contained in:
parent
035d573571
commit
12aba0db5a
|
@ -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
|
2013-11-20 Cedric Bail
|
||||||
|
|
||||||
* Eina: Fix a possible race condition during eina_file_close.
|
* Eina: Fix a possible race condition during eina_file_close.
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -437,6 +437,7 @@ Fixes:
|
||||||
- Fixed memory leak in the edje map color transition.
|
- Fixed memory leak in the edje map color transition.
|
||||||
- Add null checking for name of anchor and item in geometry get functions.
|
- 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 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:
|
* Efreet:
|
||||||
- Fix desktop command parsing of https.
|
- Fix desktop command parsing of https.
|
||||||
|
|
|
@ -650,7 +650,6 @@ _edje_recalc_do(Edje *ed)
|
||||||
need_calc = evas_object_smart_need_recalculate_get(ed->obj);
|
need_calc = evas_object_smart_need_recalculate_get(ed->obj);
|
||||||
evas_object_smart_need_recalculate_set(ed->obj, 0);
|
evas_object_smart_need_recalculate_set(ed->obj, 0);
|
||||||
if (!ed->dirty) return;
|
if (!ed->dirty) return;
|
||||||
ed->have_mapped_part = EINA_FALSE;
|
|
||||||
ed->dirty = EINA_FALSE;
|
ed->dirty = EINA_FALSE;
|
||||||
ed->state++;
|
ed->state++;
|
||||||
for (i = 0; i < ed->table_parts_size; i++)
|
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) ||
|
(statep1 >= ep->param1.state) ||
|
||||||
proxy_invalidate ||
|
proxy_invalidate ||
|
||||||
state ||
|
state ||
|
||||||
|
(ep->map_on && ed->have_mapped_part) ||
|
||||||
((ep->part->type == EDJE_PART_TYPE_TEXT ||
|
((ep->part->type == EDJE_PART_TYPE_TEXT ||
|
||||||
ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
|
ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
|
||||||
ed->text_part_change))
|
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) ||
|
(statep2 >= ep->param2->state) ||
|
||||||
proxy_invalidate ||
|
proxy_invalidate ||
|
||||||
state ||
|
state ||
|
||||||
|
(ep->map_on && ed->have_mapped_part) ||
|
||||||
((ep->part->type == EDJE_PART_TYPE_TEXT ||
|
((ep->part->type == EDJE_PART_TYPE_TEXT ||
|
||||||
ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
|
ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
|
||||||
ed->text_part_change))
|
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;
|
static Evas_Map *map = NULL;
|
||||||
|
|
||||||
ed->have_mapped_part = EINA_TRUE;
|
ed->have_mapped_part = EINA_TRUE;
|
||||||
|
ep->map_on = EINA_TRUE;
|
||||||
// create map and populate with part geometry
|
// create map and populate with part geometry
|
||||||
if (!map) map = evas_map_new(4);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
ep->map_on = EINA_FALSE;
|
||||||
|
|
||||||
if (ep->nested_smart)
|
if (ep->nested_smart)
|
||||||
{ /* Cancel map of smart obj holding nested parts */
|
{ /* Cancel map of smart obj holding nested parts */
|
||||||
eo_do(ep->nested_smart,
|
eo_do(ep->nested_smart,
|
||||||
|
|
|
@ -1594,6 +1594,7 @@ struct _Edje_Real_Part
|
||||||
#ifdef EDJE_CALC_CACHE
|
#ifdef EDJE_CALC_CACHE
|
||||||
Eina_Bool invalidate : 1; // 0
|
Eina_Bool invalidate : 1; // 0
|
||||||
#endif
|
#endif
|
||||||
|
Eina_Bool map_on : 1; // 0
|
||||||
}; // 128
|
}; // 128
|
||||||
// WITH EDJE_CALC_CACHE: 407
|
// WITH EDJE_CALC_CACHE: 407
|
||||||
|
|
||||||
|
|
|
@ -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 x = va_arg(*list, Evas_Coord);
|
||||||
Evas_Coord y = va_arg(*list, Evas_Coord);
|
Evas_Coord y = va_arg(*list, Evas_Coord);
|
||||||
Edje *ed = _pd;
|
Edje *ed = _pd;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
if ((ed->x == x) && (ed->y == y)) return;
|
if ((ed->x == x) && (ed->y == y)) return;
|
||||||
ed->x = x;
|
ed->x = x;
|
||||||
|
@ -168,43 +169,41 @@ _edje_smart_move(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < ed->table_parts_size; i++)
|
||||||
|
{
|
||||||
|
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, 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->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||||
|
_edje_entry_real_part_configure(ed, ep);
|
||||||
|
}
|
||||||
|
|
||||||
if (ed->have_mapped_part)
|
if (ed->have_mapped_part)
|
||||||
{
|
{
|
||||||
ed->dirty = EINA_TRUE;
|
ed->dirty = EINA_TRUE;
|
||||||
_edje_recalc_do(ed);
|
_edje_recalc_do(ed);
|
||||||
|
ed->have_mapped_part = EINA_FALSE;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
for (i = 0; i < ed->table_parts_size; i++)
|
|
||||||
{
|
|
||||||
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, 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->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
|
||||||
_edje_entry_real_part_configure(ed, ep);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// _edje_emit(ed, "move", NULL);
|
// _edje_emit(ed, "move", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue