diff options
-rw-r--r-- | conf.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -320,7 +320,6 @@ void conf_clear(struct conf *c) { struct autogroup *ag; - struct bind_ctx *kb, *mb; struct winname *wn; struct cmd_ctx *cmd, *wm; int i; @@ -337,10 +336,7 @@ conf_clear(struct conf *c) free(wm->path); free(wm); } - while ((kb = TAILQ_FIRST(&c->keybindq)) != NULL) { - TAILQ_REMOVE(&c->keybindq, kb, entry); - free(kb); - } + conf_unbind_key(c, NULL); while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) { TAILQ_REMOVE(&c->autogroupq, ag, entry); free(ag->class); @@ -352,10 +348,7 @@ conf_clear(struct conf *c) free(wn->name); free(wn); } - while ((mb = TAILQ_FIRST(&c->mousebindq)) != NULL) { - TAILQ_REMOVE(&c->mousebindq, mb, entry); - free(mb); - } + conf_unbind_mouse(c, NULL); for (i = 0; i < CWM_COLOR_NITEMS; i++) free(c->color[i]); |