diff options
author | okan <okan> | 2015-09-16 17:58:25 +0000 |
---|---|---|
committer | okan <okan> | 2015-09-16 17:58:25 +0000 |
commit | 0fdcf3f3dfd336e7593482286dff49cd8be6ce44 (patch) | |
tree | 93ef81d5c129af3aeae6650297f0276300882818 /kbfunc.c | |
parent | 47a10cc05549b0a94e3606ca7be9fe626754d12d (diff) | |
download | cwm-0fdcf3f3dfd336e7593482286dff49cd8be6ce44.tar.gz cwm-0fdcf3f3dfd336e7593482286dff49cd8be6ce44.tar.xz cwm-0fdcf3f3dfd336e7593482286dff49cd8be6ce44.zip |
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.
Diffstat (limited to 'kbfunc.c')
-rw-r--r-- | kbfunc.c | 5 |
1 files changed, 3 insertions, 2 deletions
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!"); |