summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_main.c')
-rw-r--r--src/lib/elementary/elm_main.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index c82050e944..4d65e56052 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -930,6 +930,18 @@ static int (*qr_main)(int argc,
930 char **argv) = NULL; 930 char **argv) = NULL;
931static void (*qre_main)(void *data, 931static void (*qre_main)(void *data,
932 const Efl_Event *ev) = NULL; 932 const Efl_Event *ev) = NULL;
933static void (*qre_pause)(void *data,
934 const Efl_Event *ev) = NULL;
935static void (*qre_resume)(void *data,
936 const Efl_Event *ev) = NULL;
937static void (*qre_terminate)(void *data,
938 const Efl_Event *ev) = NULL;
939
940EFL_CALLBACKS_ARRAY_DEFINE(_qre_main_ex,
941 { EFL_LOOP_EVENT_ARGUMENTS, qre_main },
942 { EFL_LOOP_EVENT_PAUSE, qre_pause },
943 { EFL_LOOP_EVENT_RESUME, qre_resume },
944 { EFL_EVENT_DEL, qre_terminate });
933 945
934EAPI Eina_Bool 946EAPI Eina_Bool
935elm_quicklaunch_prepare(int argc, 947elm_quicklaunch_prepare(int argc,
@@ -1057,6 +1069,9 @@ efl_quicklaunch_prepare(int argc,
1057 { 1069 {
1058 INF("dlopen('%s') = %p", exe, qr_handle); 1070 INF("dlopen('%s') = %p", exe, qr_handle);
1059 qre_main = dlsym(qr_handle, "efl_main"); 1071 qre_main = dlsym(qr_handle, "efl_main");
1072 qre_pause = dlsym(qr_handle, "efl_pause");
1073 qre_resume = dlsym(qr_handle, "efl_resume");
1074 qre_terminate = dlsym(qr_handle, "efl_terminate");
1060 if (qre_main) 1075 if (qre_main)
1061 { 1076 {
1062 INF("dlsym(%p, 'elm_main') = %p", qr_handle, qre_main); 1077 INF("dlsym(%p, 'elm_main') = %p", qr_handle, qre_main);
@@ -1090,6 +1105,9 @@ efl_quicklaunch_prepare(int argc,
1090 INF("dlopen('%s') = %p", exe2, qr_handle); 1105 INF("dlopen('%s') = %p", exe2, qr_handle);
1091 qre_main = dlsym(qr_handle, "efl_main"); 1106 qre_main = dlsym(qr_handle, "efl_main");
1092 INF("dlsym(%p, 'elm_main') = %p", qr_handle, qre_main); 1107 INF("dlsym(%p, 'elm_main') = %p", qr_handle, qre_main);
1108 qre_pause = dlsym(qr_handle, "efl_pause");
1109 qre_resume = dlsym(qr_handle, "efl_resume");
1110 qre_terminate = dlsym(qr_handle, "efl_terminate");
1093 if (!qre_main) 1111 if (!qre_main)
1094 { 1112 {
1095 WRN("not quicklauncher capable: no efl_main in '%s'", exe2); 1113 WRN("not quicklauncher capable: no efl_main in '%s'", exe2);
@@ -1210,7 +1228,14 @@ elm_quicklaunch_fork(int argc,
1210 1228
1211 if (qre_main) 1229 if (qre_main)
1212 { 1230 {
1213 efl_event_callback_add(ecore_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL); 1231 if (qre_pause && qre_resume && qre_terminate)
1232 {
1233 efl_event_callback_array_add(ecore_main_loop_get(), _qre_main_ex(), NULL);
1234 }
1235 else
1236 {
1237 efl_event_callback_add(ecore_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL);
1238 }
1214 ret = efl_loop_begin(ecore_main_loop_get()); 1239 ret = efl_loop_begin(ecore_main_loop_get());
1215 elm_shutdown(); 1240 elm_shutdown();
1216 exit(ret); 1241 exit(ret);