aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.c
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-03-18 19:46:53 +0100
committerWolfgang Müller2021-04-27 12:28:35 +0200
commitc0f391e648f52cd9b8fa6e534a2f97a8ba0f46a9 (patch)
tree953c484d4a75cfcff94bdb3184b33136ef72ea4f /calmwm.c
parent26a8c6ced076b6a49b130deb4fe35d6707bebbae (diff)
downloadcwm-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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/calmwm.c b/calmwm.c
index d90a754..2f3c4e4 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -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;