diff --git a/src/bin/e_alert.c b/src/bin/e_alert.c index cdfe88bd4..d86e70218 100644 --- a/src/bin/e_alert.c +++ b/src/bin/e_alert.c @@ -37,7 +37,8 @@ e_alert_show(int sig) snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_alert %d %lu %lu", - e_prefix_lib_get(), sig, (long unsigned int)getpid(), e_alert_composite_win); + e_prefix_lib_get(), sig, (long unsigned int)getpid(), + e_alert_composite_win); alert_exe = ecore_exe_run(buf, NULL); pause(); diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index 5d64b8a3f..7d7e6f489 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -41,7 +41,6 @@ static void _e_alert_exit_e(void); /* local variables */ static Ecore_Ipc_Server *_ipc_server = NULL; -static Ecore_Ipc_Server *_server = NULL; static xcb_connection_t *conn = NULL; static xcb_screen_t *screen = NULL; static xcb_window_t win = 0, comp_win = 0; @@ -79,6 +78,7 @@ main(int argc, char **argv) } if (!ecore_init()) return EXIT_FAILURE; + ecore_app_args_set(argc, (const char **)argv); if (!ecore_ipc_init()) { ecore_shutdown(); @@ -134,22 +134,9 @@ _e_alert_ipc_init(void) _ipc_server = ecore_ipc_server_connect(ECORE_IPC_LOCAL_SYSTEM, edir, 0, NULL); if (!_ipc_server) return 0; - - ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, - _e_alert_ipc_server_add, NULL); return 1; } -static Eina_Bool -_e_alert_ipc_server_add(void *data, int type, void *event) -{ - Ecore_Ipc_Event_Server_Add *e; - - e = event; - _server = e->server; - return ECORE_CALLBACK_PASS_ON; -} - static int _e_alert_connect(void) { @@ -376,7 +363,7 @@ _e_alert_run(void) break; } free(event); - if (ret > 0) break; + if (ret > 0) return; } } @@ -609,15 +596,15 @@ _e_alert_draw_button_text(void) static void _e_alert_restart_e(void) { - kill(getppid(), SIGUSR2); - ecore_ipc_server_send(_server, 8, 0, 0, 0, 0, NULL, 0); - ecore_ipc_server_flush(_server); + kill(pid, SIGUSR2); + ecore_ipc_server_send(_ipc_server, 8, 0, 0, 0, 0, NULL, 0); + ecore_ipc_server_flush(_ipc_server); } static void _e_alert_exit_e(void) { - kill(getppid(), SIGUSR2); - ecore_ipc_server_send(_server, 8, 1, 0, 0, 0, NULL, 0); - ecore_ipc_server_flush(_server); + kill(pid, SIGUSR2); + ecore_ipc_server_send(_ipc_server, 8, 1, 0, 0, 0, NULL, 0); + ecore_ipc_server_flush(_ipc_server); } diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c index de443295d..8cf7d4513 100644 --- a/src/bin/e_ipc.c +++ b/src/bin/e_ipc.c @@ -212,7 +212,7 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event) a = e_action_find("restart"); break; case E_ALERT_OP_EXIT: - a = e_action_find("exit"); + a = e_action_find("exit_now"); break; } if ((a) && (a->func.go)) a->func.go(NULL, NULL);