swaybar: Move swaybar_teardown to free_state

This commit is contained in:
Mikkel Oscar Lyderik 2016-01-24 01:03:08 +01:00
parent fcc47cb3bd
commit 6140f9c42c
6 changed files with 87 additions and 49 deletions

View file

@ -152,8 +152,7 @@ static void ipc_parse_config(struct swaybar_config *config, const char *payload)
static void ipc_update_workspaces(struct swaybar_state *state) {
if (state->output->workspaces) {
list_foreach(state->output->workspaces, free_workspace);
list_free(state->output->workspaces);
free_workspaces(state->output->workspaces);
}
state->output->workspaces = create_list();