diff options
author | Tony Crisci <[email protected]> | 2018-04-03 12:25:19 -0400 |
---|---|---|
committer | Tony Crisci <[email protected]> | 2018-04-03 12:25:19 -0400 |
commit | b4c5f79725142c78a398a22981392d645bc9d2e9 (patch) | |
tree | c6f836b1179c018c55b6dfead9cbca4e2fa97876 /sway/tree/view.c | |
parent | 7afbe9284ff1ca2eece6da1838061cad9ed655e0 (diff) |
move view and workspace destructors to container.c
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index eeadc5d8..c06924f5 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -27,8 +27,7 @@ void view_destroy(struct sway_view *view) { view_unmap(view); } - container_view_destroy(view->swayc); - free(view); + container_destroy(view->swayc); } const char *view_get_title(struct sway_view *view) { @@ -78,14 +77,6 @@ void view_close(struct sway_view *view) { } } -void container_view_destroy(struct sway_container *view) { - if (!view) { - return; - } - wlr_log(L_DEBUG, "Destroying view '%s'", view->name); - container_destroy(view); -} - void view_damage_whole(struct sway_view *view) { for (int i = 0; i < root_container.children->length; ++i) { struct sway_container *cont = root_container.children->items[i]; @@ -158,7 +149,7 @@ void view_unmap(struct sway_view *view) { view_damage_whole(view); - container_view_destroy(view->swayc); + container_destroy(view->swayc); view->swayc = NULL; view->surface = NULL; |