summaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorTony Crisci <[email protected]>2018-03-30 16:16:12 -0400
committerGitHub <[email protected]>2018-03-30 16:16:12 -0400
commit7e0d430a0cee8c24fd4461711f264829b0f67e2e (patch)
treed55cdd62bd7470ff67953613c25a3a9b85182f50 /sway/tree/view.c
parentcf09ea184b891594331240eb860f28975dcb8b8c (diff)
parent7eca02301ba309fa909ba9b12cb335f8f944f1ee (diff)
Merge branch 'wlroots' into wlroots-xwayland-map
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;
+}