summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/edje/edje_cache.c')
-rw-r--r--src/lib/edje/edje_cache.c37
1 files changed, 28 insertions, 9 deletions
diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c
index 20ae174..64eb6ad 100644
--- a/src/lib/edje/edje_cache.c
+++ b/src/lib/edje/edje_cache.c
@@ -140,9 +140,9 @@ _edje_programs_patterns_init(Edje_Part_Collection *edc)
140 j = 0; 140 j = 0;
141 141
142 /* FIXME: Build specialized data type for each case */ 142 /* FIXME: Build specialized data type for each case */
143#define EDJE_LOAD_PROGRAMS_ADD(Array, Edc, It, Git, All) \ 143#define EDJE_LOAD_PROGRAMS_ADD(Array, Edc, It, Git, All) \
144 for (It = 0; It < Edc->programs.Array##_count; ++It, ++Git) \ 144 for (It = 0; It < Edc->programs.Array##_count; ++It, ++Git) \
145 All[Git] = Edc->programs.Array[It]; 145 All[Git] = Edc->programs.Array[It];
146 146
147 EDJE_LOAD_PROGRAMS_ADD(fnmatch, edc, i, j, all); 147 EDJE_LOAD_PROGRAMS_ADD(fnmatch, edc, i, j, all);
148 EDJE_LOAD_PROGRAMS_ADD(strncmp, edc, i, j, all); 148 EDJE_LOAD_PROGRAMS_ADD(strncmp, edc, i, j, all);
@@ -367,12 +367,14 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
367 { 367 {
368 edc->patterns.table_programs_size = n; 368 edc->patterns.table_programs_size = n;
369 369
370#define EDJE_LOAD_BUILD_TABLE(Array, Edc, It, Tmp) \ 370#define EDJE_LOAD_BUILD_TABLE(Array, Edc, It, Tmp) \
371 for (It = 0; It < Edc->programs.Array##_count; ++It) \ 371 for (It = 0; It < Edc->programs.Array##_count; ++It) \
372 { \ 372 { \
373 Tmp = Edc->programs.Array[It]; \ 373 Tmp = Edc->programs.Array[It]; \
374 Edc->patterns.table_programs[Tmp->id] = Tmp; \ 374 Edc->patterns.table_programs[Tmp->id] = Tmp; \
375 } 375 if (!Edc->need_seat && Tmp->signal && !strncmp(Tmp->signal, "seat,", 5)) \
376 Edc->need_seat = EINA_TRUE; \
377 }
376 378
377 EDJE_LOAD_BUILD_TABLE(fnmatch, edc, i, pr); 379 EDJE_LOAD_BUILD_TABLE(fnmatch, edc, i, pr);
378 EDJE_LOAD_BUILD_TABLE(strcmp, edc, i, pr); 380 EDJE_LOAD_BUILD_TABLE(strcmp, edc, i, pr);
@@ -382,6 +384,23 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
382 } 384 }
383 } 385 }
384 386
387 /* Search for the use of allowed seat used by part if we still do not know if seat are needed. */
388 if (!edc->need_seat)
389 {
390 unsigned int i;
391
392 for (i = 0; i < edc->parts_count; i++)
393 {
394 Edje_Part *part = edc->parts[i];
395
396 if (part->allowed_seats)
397 {
398 edc->need_seat = EINA_TRUE;
399 break;
400 }
401 }
402 }
403
385 _edje_part_collection_fix(edc); 404 _edje_part_collection_fix(edc);
386 405
387 return edc; 406 return edc;