summaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorRyan Dwyer <[email protected]>2018-08-25 13:06:04 +1000
committerGitHub <[email protected]>2018-08-25 13:06:04 +1000
commit4b9ad9c2382db9b2a9a224e9ebc60b6298843aa9 (patch)
treef1ed7e866d4e34f5ef9b8f72ec8095369619aaa7 /sway/tree/view.c
parentf51b9478f28143a4f1887711497ff131f26ab1c4 (diff)
parente86d99acd655815781cd2e23877ce58ab5b24826 (diff)
Merge branch 'master' into commands
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 7bf7325a..ba4a880f 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -35,7 +35,7 @@ void view_init(struct sway_view *view, enum sway_view_type type,
wl_signal_init(&view->events.unmap);
}
-void view_free(struct sway_view *view) {
+void view_destroy(struct sway_view *view) {
if (!sway_assert(view->surface == NULL, "Tried to free mapped view")) {
return;
}
@@ -75,14 +75,14 @@ void view_free(struct sway_view *view) {
* destroying flag will make the view get freed when the transaction is
* finished.
*/
-void view_destroy(struct sway_view *view) {
+void view_begin_destroy(struct sway_view *view) {
if (!sway_assert(view->surface == NULL, "Tried to destroy a mapped view")) {
return;
}
view->destroying = true;
if (!view->swayc) {
- view_free(view);
+ view_destroy(view);
}
}
@@ -560,7 +560,9 @@ void view_unmap(struct sway_view *view) {
}
bool was_fullscreen = view->swayc->is_fullscreen;
- struct sway_container *surviving_ancestor = container_destroy(view->swayc);
+ struct sway_container *parent = view->swayc->parent;
+ container_begin_destroy(view->swayc);
+ struct sway_container *surviving_ancestor = container_reap_empty(parent);
// If the workspace wasn't reaped
if (surviving_ancestor && surviving_ancestor->type >= C_WORKSPACE) {