summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_main.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-11-06 13:49:18 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-11-07 16:08:39 -0800
commitee65414ef6b75a61044227a9a4ab10201cee787d (patch)
treea9a3aa18f6677e4953d4ea252e69966e441fc7d6 /src/lib/elementary/elm_main.c
parent3d72cb8da38d014a75a2e2908ee37b33676f38b5 (diff)
ecore: introduce ecore_init_ex/ecore_shutdown_ex to propagate argc,argv properly.
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/elm_main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 3b089583ee..551df529c1 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -406,9 +406,6 @@ elm_init(int argc, char **argv)
406 elm_quicklaunch_init(argc, argv); 406 elm_quicklaunch_init(argc, argv);
407 elm_quicklaunch_sub_init(argc, argv); 407 elm_quicklaunch_sub_init(argc, argv);
408 408
409 ecore_loop_arguments_send(argc - 1,
410 (argc > 1) ? ((const char **)argv + 1) : NULL);
411
412 _prefix_shutdown(); 409 _prefix_shutdown();
413 410
414 system_handlers[0] = 411 system_handlers[0] =
@@ -752,7 +749,6 @@ elm_quicklaunch_init(int argc,
752#ifdef HAVE_ELEMENTARY_EMAP 749#ifdef HAVE_ELEMENTARY_EMAP
753 emap_init(); 750 emap_init();
754#endif 751#endif
755 ecore_app_args_set(argc, (const char **)argv);
756 752
757 memset(_elm_policies, 0, sizeof(_elm_policies)); 753 memset(_elm_policies, 0, sizeof(_elm_policies));
758 if (!ELM_EVENT_POLICY_CHANGED) 754 if (!ELM_EVENT_POLICY_CHANGED)
@@ -812,7 +808,6 @@ elm_quicklaunch_sub_init(int argc,
812 808
813 if (!quicklaunch_on) 809 if (!quicklaunch_on)
814 { 810 {
815 ecore_app_args_set(argc, (const char **)argv);
816 ecore_evas_init(); // FIXME: check errors 811 ecore_evas_init(); // FIXME: check errors
817 edje_init(); 812 edje_init();
818 elm_color_class_init(); 813 elm_color_class_init();
@@ -824,6 +819,8 @@ elm_quicklaunch_sub_init(int argc,
824 ecore_con_url_init(); 819 ecore_con_url_init();
825 _elm_prefs_initted = _elm_prefs_init(); 820 _elm_prefs_initted = _elm_prefs_init();
826 _elm_ews_wm_init(); 821 _elm_ews_wm_init();
822
823 ecore_init_ex(argc, argv);
827 } 824 }
828 return _elm_sub_init_count; 825 return _elm_sub_init_count;
829} 826}
@@ -1189,7 +1186,6 @@ elm_quicklaunch_fork(int argc,
1189 _elm_appname = strdup(ecore_file_file_get(argv[0])); 1186 _elm_appname = strdup(ecore_file_file_get(argv[0]));
1190 1187
1191#ifdef SEMI_BROKEN_QUICKLAUNCH 1188#ifdef SEMI_BROKEN_QUICKLAUNCH
1192 ecore_app_args_set(argc, (const char **)argv);
1193 evas_init(); 1189 evas_init();
1194 _elm_module_init(); 1190 _elm_module_init();
1195 _elm_config_sub_init(); 1191 _elm_config_sub_init();
@@ -1233,7 +1229,6 @@ elm_quicklaunch_fork(int argc,
1233 1229
1234 setsid(); 1230 setsid();
1235 if (chdir(cwd) != 0) perror("could not chdir"); 1231 if (chdir(cwd) != 0) perror("could not chdir");
1236 ecore_app_args_set(argc, (const char **)argv);
1237 if (_elm_config->atspi_mode != ELM_ATSPI_MODE_OFF) 1232 if (_elm_config->atspi_mode != ELM_ATSPI_MODE_OFF)
1238 _elm_atspi_bridge_init(); 1233 _elm_atspi_bridge_init();
1239 1234
@@ -1247,15 +1242,21 @@ elm_quicklaunch_fork(int argc,
1247 { 1242 {
1248 efl_event_callback_add(ecore_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL); 1243 efl_event_callback_add(ecore_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL);
1249 } 1244 }
1245
1246 ecore_init_ex(argc, argv);
1247
1250 ret = efl_loop_exit_code_process(efl_loop_begin(ecore_main_loop_get())); 1248 ret = efl_loop_exit_code_process(efl_loop_begin(ecore_main_loop_get()));
1251 elm_shutdown(); 1249 elm_shutdown();
1252 exit(ret); 1250 exit(ret);
1253 } 1251 }
1254 else 1252 else
1255 { 1253 {
1254 ecore_init_ex(argc, argv);
1255
1256 ret = qr_main(argc, argv); 1256 ret = qr_main(argc, argv);
1257 exit(ret); 1257 exit(ret);
1258 } 1258 }
1259
1259 return EINA_TRUE; 1260 return EINA_TRUE;
1260#else 1261#else
1261 return EINA_FALSE; 1262 return EINA_FALSE;