aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-30 11:58:17 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-30 13:49:34 -0400
commit49379dd0fc0758f89d7f4fa4fb5b08c7f4c26ae6 (patch)
treeb67a66382125811fde75e5c3dff37d7081860c78 /sway/tree/view.c
parent1c50d79e1940d9dce6217d0ca19611a19709120a (diff)
Fix workspace deletion edge cases
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index d5325c31..480ff693 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -3,6 +3,7 @@
#include "sway/tree/container.h"
#include "sway/tree/layout.h"
#include "sway/tree/view.h"
+#include "log.h"
const char *view_get_title(struct sway_view *view) {
if (view->iface.get_prop) {
@@ -94,3 +95,13 @@ void view_update_outputs(struct sway_view *view, const struct wlr_box *before) {
}
}
}
+
+struct sway_container *container_view_destroy(struct sway_container *view) {
+ if (!view) {
+ return NULL;
+ }
+ wlr_log(L_DEBUG, "Destroying view '%s'", view->name);
+ struct sway_container *parent = container_destroy(view);
+ arrange_windows(parent, -1, -1);
+ return parent;
+}