summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-05-14 15:40:19 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-05-14 21:29:32 +0100
commitf0aafab359321726cf987433c7c7b9104af12c62 (patch)
treeffa7ec7498f486b7c0e7cfeaec912a649f25e797
parentbc426e178193809854cc6ee250a47d80cf83f253 (diff)
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.
-rw-r--r--src/bin/e_alert_main.c12
-rw-r--r--src/bin/e_start_main.c2
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
131 ev = event; 131 ev = event;
132 if (!strcmp(ev->key, "F12")) 132 if (!strcmp(ev->key, "F12"))
133 { 133 {
134 ret = 2; 134 ret = 1;
135 ecore_main_loop_quit(); 135 ecore_main_loop_quit();
136 } 136 }
137 else if (!strcmp(ev->key, "F1")) 137 else if (!strcmp(ev->key, "F1"))
138 { 138 {
139 ret = 1; 139 ret = 2;
140 ecore_main_loop_quit(); 140 ecore_main_loop_quit();
141 } 141 }
142 142
@@ -589,8 +589,8 @@ main(int argc, char **argv)
589#endif 589#endif
590 ecore_shutdown(); 590 ecore_shutdown();
591 591
592 /* ret == 1 => restart e => exit code 1 */ 592 /* ret == 1 => exit e => exit code 1 */
593 /* ret == 2 => exit e => any code will do that */ 593 /* ret == 2 => restart e => any code will do that */
594 return ret; 594 return ret;
595} 595}
596#ifndef HAVE_WAYLAND_ONLY 596#ifndef HAVE_WAYLAND_ONLY
@@ -922,9 +922,9 @@ _e_alert_handle_key_press(xcb_generic_event_t *event)
922 key = xcb_key_symbols_get_keysym(symbols, ev->detail, 0); 922 key = xcb_key_symbols_get_keysym(symbols, ev->detail, 0);
923 923
924 if (key == XK_F1) 924 if (key == XK_F1)
925 r = 1;
926 else if (key == XK_F12)
927 r = 2; 925 r = 2;
926 else if (key == XK_F12)
927 r = 1;
928 928
929 xcb_key_symbols_free(symbols); 929 xcb_key_symbols_free(symbols);
930 930
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:
767 /* kill e */ 767 /* kill e */
768 kill(child, SIGKILL); 768 kill(child, SIGKILL);
769 769
770 if (WEXITSTATUS(r) != 1) 770 if (WEXITSTATUS(r) == 1)
771 restart = EINA_FALSE; 771 restart = EINA_FALSE;
772 } 772 }
773 else if (!WIFEXITED(status) || stop_ptrace) 773 else if (!WIFEXITED(status) || stop_ptrace)