autostart if autogroup empty

This commit is contained in:
Michael Weber
2012-06-28 10:26:23 +02:00
parent ac615a5407
commit fb7a2fe253
4 changed files with 62 additions and 1 deletions

8
conf.c
View File

@@ -201,6 +201,7 @@ conf_init(struct conf *c)
TAILQ_INIT(&c->cmdq);
TAILQ_INIT(&c->keybindingq);
TAILQ_INIT(&c->autogroupq);
TAILQ_INIT(&c->autostartq);
TAILQ_INIT(&c->mousebindingq);
for (i = 0; i < nitems(kb_binds); i++)
@@ -223,6 +224,7 @@ void
conf_clear(struct conf *c)
{
struct autogroupwin *ag;
struct autostartcmd *as;
struct keybinding *kb;
struct winmatch *wm;
struct cmd *cmd;
@@ -247,6 +249,12 @@ conf_clear(struct conf *c)
xfree(ag);
}
while ((as = TAILQ_FIRST(&c->autostartq)) != NULL) {
TAILQ_REMOVE(&c->autostartq, as, entry);
xfree(as->cmd);
xfree(as);
}
while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
TAILQ_REMOVE(&c->ignoreq, wm, entry);
xfree(wm);