mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 09:51:29 +00:00
swaybar: remove block links upon exit
This commit is contained in:
parent
15dadaaa44
commit
4cb28de89f
|
@ -127,13 +127,15 @@ void status_line_free(struct status_line *status) {
|
||||||
close(status->write_fd);
|
close(status->write_fd);
|
||||||
kill(status->pid, SIGTERM);
|
kill(status->pid, SIGTERM);
|
||||||
switch (status->protocol) {
|
switch (status->protocol) {
|
||||||
case PROTOCOL_I3BAR:;
|
case PROTOCOL_I3BAR: {
|
||||||
struct i3bar_block *block, *tmp;
|
struct i3bar_block *block, *tmp;
|
||||||
wl_list_for_each_safe(block, tmp, &status->blocks, link) {
|
wl_list_for_each_safe(block, tmp, &status->blocks, link) {
|
||||||
|
wl_list_remove(&block->link);
|
||||||
i3bar_block_unref(block);
|
i3bar_block_unref(block);
|
||||||
}
|
}
|
||||||
free(status->i3bar_state.buffer);
|
free(status->i3bar_state.buffer);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
free(status->text_state.buffer);
|
free(status->text_state.buffer);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue