aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index c0984ca4..648c1655 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -43,13 +43,10 @@ void view_destroy(struct sway_view *view) {
43 } 43 }
44 list_free(view->marks); 44 list_free(view->marks);
45 45
46 if (view->marks_focused) { 46 wlr_texture_destroy(view->marks_focused);
47 // If one is set then all of these are set 47 wlr_texture_destroy(view->marks_focused_inactive);
48 wlr_texture_destroy(view->marks_focused); 48 wlr_texture_destroy(view->marks_unfocused);
49 wlr_texture_destroy(view->marks_focused_inactive); 49 wlr_texture_destroy(view->marks_urgent);
50 wlr_texture_destroy(view->marks_unfocused);
51 wlr_texture_destroy(view->marks_urgent);
52 }
53 50
54 container_destroy(view->swayc); 51 container_destroy(view->swayc);
55 52
@@ -803,6 +800,11 @@ static void update_marks_texture(struct sway_view *view,
803 char *buffer = calloc(len + 1, 1); 800 char *buffer = calloc(len + 1, 1);
804 char *part = malloc(len + 1); 801 char *part = malloc(len + 1);
805 802
803 if (!sway_assert(buffer && part, "Unable to allocate memory")) {
804 free(buffer);
805 return;
806 }
807
806 for (int i = 0; i < view->marks->length; ++i) { 808 for (int i = 0; i < view->marks->length; ++i) {
807 char *mark = view->marks->items[i]; 809 char *mark = view->marks->items[i];
808 if (mark[0] != '_') { 810 if (mark[0] != '_') {