diff options
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 91e8dd7f..ac433577 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "sway/tree/arrange.h" | 21 | #include "sway/tree/arrange.h" |
22 | #include "sway/tree/view.h" | 22 | #include "sway/tree/view.h" |
23 | #include "sway/tree/workspace.h" | 23 | #include "sway/tree/workspace.h" |
24 | #include "list.h" | ||
24 | #include "log.h" | 25 | #include "log.h" |
25 | #include "stringop.h" | 26 | #include "stringop.h" |
26 | 27 | ||
@@ -67,8 +68,7 @@ void container_destroy(struct sway_container *con) { | |||
67 | list_free(con->current.children); | 68 | list_free(con->current.children); |
68 | list_free(con->outputs); | 69 | list_free(con->outputs); |
69 | 70 | ||
70 | list_foreach(con->marks, free); | 71 | free_flat_list(con->marks); |
71 | list_free(con->marks); | ||
72 | wlr_texture_destroy(con->marks_focused); | 72 | wlr_texture_destroy(con->marks_focused); |
73 | wlr_texture_destroy(con->marks_focused_inactive); | 73 | wlr_texture_destroy(con->marks_focused_inactive); |
74 | wlr_texture_destroy(con->marks_unfocused); | 74 | wlr_texture_destroy(con->marks_unfocused); |
@@ -1267,7 +1267,9 @@ bool container_find_and_unmark(char *mark) { | |||
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | void container_clear_marks(struct sway_container *con) { | 1269 | void container_clear_marks(struct sway_container *con) { |
1270 | list_foreach(con->marks, free); | 1270 | for (int i = 0; i < con->marks->length; ++i) { |
1271 | free(con->marks->items[i]); | ||
1272 | } | ||
1271 | con->marks->length = 0; | 1273 | con->marks->length = 0; |
1272 | ipc_event_window(con, "mark"); | 1274 | ipc_event_window(con, "mark"); |
1273 | } | 1275 | } |