From ebb0d051db2f73fd13a4e844a51e70f09703372a Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 15 May 2018 23:29:54 +1000 Subject: Fix many border opacity issues --- sway/tree/view.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'sway/tree/view.c') 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) { } list_free(view->marks); - if (view->marks_focused) { - // If one is set then all of these are set - wlr_texture_destroy(view->marks_focused); - wlr_texture_destroy(view->marks_focused_inactive); - wlr_texture_destroy(view->marks_unfocused); - wlr_texture_destroy(view->marks_urgent); - } + wlr_texture_destroy(view->marks_focused); + wlr_texture_destroy(view->marks_focused_inactive); + wlr_texture_destroy(view->marks_unfocused); + wlr_texture_destroy(view->marks_urgent); container_destroy(view->swayc); @@ -803,6 +800,11 @@ static void update_marks_texture(struct sway_view *view, char *buffer = calloc(len + 1, 1); char *part = malloc(len + 1); + if (!sway_assert(buffer && part, "Unable to allocate memory")) { + free(buffer); + return; + } + for (int i = 0; i < view->marks->length; ++i) { char *mark = view->marks->items[i]; if (mark[0] != '_') { -- cgit v1.2.3