From 0fdcf3f3dfd336e7593482286dff49cd8be6ce44 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 16 Sep 2015 17:58:25 +0000 Subject: On execwm, we should properly release resources before exec'ing into a new window manager; so allow CWM_EXEC_WM to assign new wm to wm_argv and pass through cwm_status (now EXECWM) so that x_teardown() gets called before exec'ing the new window manager. Removes the need for a separate x_restart() now, using new wm_argv; and consolidates errno for execvp. --- kbfunc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index c23e8f8..d8cc265 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -325,8 +325,9 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg) u_spawn(mi->text); break; case CWM_EXEC_WM: - u_exec(mi->text); - warn("%s", mi->text); + cwm_status = CWM_EXECWM; + free(wm_argv); + wm_argv = xstrdup(mi->text); break; default: errx(1, "kb_func: egad, cmd changed value!"); -- cgit 1.4.1