don't load autostart entries when restarting
This commit is contained in:
parent
2c6e7e4e51
commit
7f6d39d70c
15
speedwm.c
15
speedwm.c
|
@ -4379,6 +4379,7 @@ quit(const Arg *arg)
|
|||
|
||||
Monitor *m;
|
||||
Client *c;
|
||||
size_t i;
|
||||
|
||||
for (m = mons; m; m = m->next) {
|
||||
if (m) {
|
||||
|
@ -4387,6 +4388,14 @@ quit(const Arg *arg)
|
|||
}
|
||||
}
|
||||
|
||||
/* kill child processes */
|
||||
for (i = 0; i < autostart_len; i++) {
|
||||
if (0 < autostart_pids[i]) {
|
||||
kill(autostart_pids[i], SIGTERM);
|
||||
waitpid(autostart_pids[i], NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if(arg->i) restart = 1;
|
||||
running = 0;
|
||||
}
|
||||
|
@ -6532,6 +6541,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
if (!(xcon = XGetXCBConnection(dpy)))
|
||||
die("speedwm: Cannot get xcb connection\n");
|
||||
if (!restart) autostart_exec();
|
||||
checkotherwm();
|
||||
XrmInitialize();
|
||||
#if USEXRESOURCES
|
||||
|
@ -6544,11 +6554,8 @@ main(int argc, char *argv[])
|
|||
#endif /* __OpenBSD__ */
|
||||
scan();
|
||||
run();
|
||||
if(restart) {
|
||||
if (restart)
|
||||
execvp(argv[0], argv);
|
||||
} else {
|
||||
autostart_exec();
|
||||
}
|
||||
cleanup();
|
||||
XCloseDisplay(dpy);
|
||||
return EXIT_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue