diff options
author | Wynn Wolf Arbor | 2020-03-18 19:46:53 +0100 |
---|---|---|
committer | Wolfgang Müller | 2021-04-27 12:28:35 +0200 |
commit | c0f391e648f52cd9b8fa6e534a2f97a8ba0f46a9 (patch) | |
tree | 953c484d4a75cfcff94bdb3184b33136ef72ea4f /calmwm.c | |
parent | 26a8c6ced076b6a49b130deb4fe35d6707bebbae (diff) | |
download | cwm-c0f391e648f52cd9b8fa6e534a2f97a8ba0f46a9.tar.gz |
Remove wm menu
Whilst arguably useful for certain people, or in rare cases, this
functionality is not needed in the general case.
This will also remove a memory leak where fallback was not properly
freed.
Diffstat (limited to '')
-rw-r--r-- | calmwm.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -59,7 +59,7 @@ int main(int argc, char **argv) { char *display_name = NULL; - char *fallback; + char **saved_argv; int ch, xfd, nflag = 0; struct pollfd pfd[1]; @@ -69,8 +69,7 @@ main(int argc, char **argv) conf_init(&Conf); - fallback = u_argv(argv); - Conf.wm_argv = u_argv(argv); + saved_argv = argv; while ((ch = getopt(argc, argv, "c:d:nv")) != -1) { switch (ch) { case 'c': @@ -127,9 +126,8 @@ main(int argc, char **argv) } x_teardown(); if (cwm_status == CWM_EXEC_WM) { - u_exec(Conf.wm_argv); - warnx("'%s' failed to start, starting fallback", Conf.wm_argv); - u_exec(fallback); + execvp(saved_argv[0], saved_argv); + warnx("failed to re-exec"); } return 0; |