diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-15 23:29:54 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-17 08:29:14 +1000 |
commit | ebb0d051db2f73fd13a4e844a51e70f09703372a (patch) | |
tree | ba0248bf61b783299e8dea938a1ae90299fd62f4 /sway/tree | |
parent | b1645fb352748398783981ecccad0f42e285b6bf (diff) |
Fix many border opacity issues
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 13 | ||||
-rw-r--r-- | sway/tree/view.c | 16 |
2 files changed, 15 insertions, 14 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 47ba88a9..e47338e7 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -123,13 +123,12 @@ static void _container_destroy(struct sway_container *cont) { if (cont->name) { free(cont->name); } - if (cont->title_focused) { - // If one is set then all of these are set - wlr_texture_destroy(cont->title_focused); - wlr_texture_destroy(cont->title_focused_inactive); - wlr_texture_destroy(cont->title_unfocused); - wlr_texture_destroy(cont->title_urgent); - } + + wlr_texture_destroy(cont->title_focused); + wlr_texture_destroy(cont->title_focused_inactive); + wlr_texture_destroy(cont->title_unfocused); + wlr_texture_destroy(cont->title_urgent); + list_free(cont->children); cont->children = NULL; free(cont); 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] != '_') { |