From f0aafab359321726cf987433c7c7b9104af12c62 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 14 May 2019 15:40:19 +0100 Subject: [PATCH] e alert - change exit codes around so exit is explicit so often enough i find e_alert is hung and you have to kill it to get e back. this ends upo exiting and logging you out. this is not good. the defaul should be to restart not to dump you out and lose everything. so switch these around to be more user-friendly. on the cards is to redo e_alert to be simpler (use full efl stack) and thus hopefulyl be reliable in wl mode etc. --- src/bin/e_alert_main.c | 12 ++++++------ src/bin/e_start_main.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index 1baa648f9..d30101e51 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -131,12 +131,12 @@ _e_alert_drm_cb_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *eve ev = event; if (!strcmp(ev->key, "F12")) { - ret = 2; + ret = 1; ecore_main_loop_quit(); } else if (!strcmp(ev->key, "F1")) { - ret = 1; + ret = 2; ecore_main_loop_quit(); } @@ -589,8 +589,8 @@ main(int argc, char **argv) #endif ecore_shutdown(); - /* ret == 1 => restart e => exit code 1 */ - /* ret == 2 => exit e => any code will do that */ + /* ret == 1 => exit e => exit code 1 */ + /* ret == 2 => restart e => any code will do that */ return ret; } #ifndef HAVE_WAYLAND_ONLY @@ -922,9 +922,9 @@ _e_alert_handle_key_press(xcb_generic_event_t *event) key = xcb_key_symbols_get_keysym(symbols, ev->detail, 0); if (key == XK_F1) - r = 1; - else if (key == XK_F12) r = 2; + else if (key == XK_F12) + r = 1; xcb_key_symbols_free(symbols); diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c index fbaab4aaf..b4e4d9f58 100644 --- a/src/bin/e_start_main.c +++ b/src/bin/e_start_main.c @@ -767,7 +767,7 @@ not_done: /* kill e */ kill(child, SIGKILL); - if (WEXITSTATUS(r) != 1) + if (WEXITSTATUS(r) == 1) restart = EINA_FALSE; } else if (!WIFEXITED(status) || stop_ptrace)