mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
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.
This commit is contained in:
5
kbfunc.c
5
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!");
|
||||
|
Reference in New Issue
Block a user