aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2013-11-21 13:26:37 +0900
committerChunEon Park <hermet@hermet.pe.kr>2013-11-21 13:26:37 +0900
commit12aba0db5a0949488d37b69b8696ed424666dca8 (patch)
tree685af3494c7d93c628db00f950a35b6e578f7fc3
parentedje - cleaning the code. (diff)
downloadefl-12aba0db5a0949488d37b69b8696ed424666dca8.tar.gz
edje - Fix to update map enabled part when edje object is moved.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/edje/edje_calc.c6
-rw-r--r--src/lib/edje/edje_private.h1
-rw-r--r--src/lib/edje/edje_smart.c59
5 files changed, 40 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index b9c4c2859c..de43e9edc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/NEWS b/NEWS
index 01803f8a69..cdb7d7dd03 100644
--- a/NEWS
+++ b/NEWS
@@ -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 b6816ee150..6f98455c78 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 b6e0db909b..bfcc9b761e 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 d4c095e3f2..7fb79a86e3 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);
}