aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/conf.c b/conf.c
index aa7d55c..6f66ba4 100644
--- a/conf.c
+++ b/conf.c
@@ -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]);