summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
12013-11-21 ChunEon Park (Hermet)
2
3 * Edje: Fix to update map-enabled part when the edje object is moved.
4
12013-11-20 Cedric Bail 52013-11-20 Cedric Bail
2 6
3 * Eina: Fix a possible race condition during eina_file_close. 7 * 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:
437 - Fixed memory leak in the edje map color transition. 437 - Fixed memory leak in the edje map color transition.
438 - Add null checking for name of anchor and item in geometry get functions. 438 - Add null checking for name of anchor and item in geometry get functions.
439 - Fix use of eina_hash_pointer to actually look at the pointer value. 439 - Fix use of eina_hash_pointer to actually look at the pointer value.
440 - Fix to update map-enabled part when the edje object is moved.
440 441
441 * Efreet: 442 * Efreet:
442 - Fix desktop command parsing of https. 443 - 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)
650 need_calc = evas_object_smart_need_recalculate_get(ed->obj); 650 need_calc = evas_object_smart_need_recalculate_get(ed->obj);
651 evas_object_smart_need_recalculate_set(ed->obj, 0); 651 evas_object_smart_need_recalculate_set(ed->obj, 0);
652 if (!ed->dirty) return; 652 if (!ed->dirty) return;
653 ed->have_mapped_part = EINA_FALSE;
654 ed->dirty = EINA_FALSE; 653 ed->dirty = EINA_FALSE;
655 ed->state++; 654 ed->state++;
656 for (i = 0; i < ed->table_parts_size; i++) 655 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
3353 (statep1 >= ep->param1.state) || 3352 (statep1 >= ep->param1.state) ||
3354 proxy_invalidate || 3353 proxy_invalidate ||
3355 state || 3354 state ||
3355 (ep->map_on && ed->have_mapped_part) ||
3356 ((ep->part->type == EDJE_PART_TYPE_TEXT || 3356 ((ep->part->type == EDJE_PART_TYPE_TEXT ||
3357 ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && 3357 ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
3358 ed->text_part_change)) 3358 ed->text_part_change))
@@ -3421,6 +3421,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
3421 (statep2 >= ep->param2->state) || 3421 (statep2 >= ep->param2->state) ||
3422 proxy_invalidate || 3422 proxy_invalidate ||
3423 state || 3423 state ||
3424 (ep->map_on && ed->have_mapped_part) ||
3424 ((ep->part->type == EDJE_PART_TYPE_TEXT || 3425 ((ep->part->type == EDJE_PART_TYPE_TEXT ||
3425 ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && 3426 ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
3426 ed->text_part_change)) 3427 ed->text_part_change))
@@ -3894,6 +3895,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
3894 static Evas_Map *map = NULL; 3895 static Evas_Map *map = NULL;
3895 3896
3896 ed->have_mapped_part = EINA_TRUE; 3897 ed->have_mapped_part = EINA_TRUE;
3898 ep->map_on = EINA_TRUE;
3897 // create map and populate with part geometry 3899 // create map and populate with part geometry
3898 if (!map) map = evas_map_new(4); 3900 if (!map) map = evas_map_new(4);
3899 3901
@@ -3915,6 +3917,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
3915 } 3917 }
3916 else 3918 else
3917 { 3919 {
3920 ep->map_on = EINA_FALSE;
3921
3918 if (ep->nested_smart) 3922 if (ep->nested_smart)
3919 { /* Cancel map of smart obj holding nested parts */ 3923 { /* Cancel map of smart obj holding nested parts */
3920 eo_do(ep->nested_smart, 3924 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
1594#ifdef EDJE_CALC_CACHE 1594#ifdef EDJE_CALC_CACHE
1595 Eina_Bool invalidate : 1; // 0 1595 Eina_Bool invalidate : 1; // 0
1596#endif 1596#endif
1597 Eina_Bool map_on : 1; // 0
1597}; // 128 1598}; // 128
1598// WITH EDJE_CALC_CACHE: 407 1599// WITH EDJE_CALC_CACHE: 407
1599 1600
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)
151 Evas_Coord x = va_arg(*list, Evas_Coord); 151 Evas_Coord x = va_arg(*list, Evas_Coord);
152 Evas_Coord y = va_arg(*list, Evas_Coord); 152 Evas_Coord y = va_arg(*list, Evas_Coord);
153 Edje *ed = _pd; 153 Edje *ed = _pd;
154 unsigned int i;
154 155
155 if ((ed->x == x) && (ed->y == y)) return; 156 if ((ed->x == x) && (ed->y == y)) return;
156 ed->x = x; 157 ed->x = x;
@@ -168,43 +169,41 @@ _edje_smart_move(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
168 return; 169 return;
169 } 170 }
170 171
171 if (ed->have_mapped_part) 172 for (i = 0; i < ed->table_parts_size; i++)
172 { 173 {
173 ed->dirty = EINA_TRUE; 174 Edje_Real_Part *ep;
174 _edje_recalc_do(ed);
175 }
176 else
177 {
178 unsigned int i;
179 175
180 for (i = 0; i < ed->table_parts_size; i++) 176 ep = ed->table_parts[i];
177 if ((ep->type == EDJE_RP_TYPE_TEXT) && (ep->typedata.text))
181 { 178 {
182 Edje_Real_Part *ep; 179 evas_object_move(ep->object,
183 180 ed->x + ep->x + ep->typedata.text->offset.x,
184 ep = ed->table_parts[i]; 181 ed->y + ep->y + ep->typedata.text->offset.y);
185 if ((ep->type == EDJE_RP_TYPE_TEXT) && (ep->typedata.text)) 182 }
186 { 183 else
187 evas_object_move(ep->object, 184 {
188 ed->x + ep->x + ep->typedata.text->offset.x, 185 evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y);
189 ed->y + ep->y + ep->typedata.text->offset.y); 186 if ((ep->type == EDJE_RP_TYPE_SWALLOW) &&
190 } 187 (ep->typedata.swallow))
191 else
192 { 188 {
193 evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y); 189 if (ep->typedata.swallow->swallowed_object)
194 if ((ep->type == EDJE_RP_TYPE_SWALLOW) && 190 evas_object_move
195 (ep->typedata.swallow)) 191 (ep->typedata.swallow->swallowed_object,
196 { 192 ed->x + ep->x,
197 if (ep->typedata.swallow->swallowed_object) 193 ed->y + ep->y);
198 evas_object_move
199 (ep->typedata.swallow->swallowed_object,
200 ed->x + ep->x,
201 ed->y + ep->y);
202 }
203 } 194 }
204 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
205 _edje_entry_real_part_configure(ed, ep);
206 } 195 }
196 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
197 _edje_entry_real_part_configure(ed, ep);
207 } 198 }
199
200 if (ed->have_mapped_part)
201 {
202 ed->dirty = EINA_TRUE;
203 _edje_recalc_do(ed);
204 ed->have_mapped_part = EINA_FALSE;
205 }
206
208// _edje_emit(ed, "move", NULL); 207// _edje_emit(ed, "move", NULL);
209} 208}
210 209