aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-12-09 15:48:52 +0100
committeremersion <contact@emersion.fr>2017-12-09 15:48:52 +0100
commit4a14aa9ad99a6f316024e110332a0b482e231543 (patch)
tree2340e6dbc5ffd05c4e2c239d316b42482a474315 /sway/tree
parent8764dc26c634379ca5b5c2c4fc26cf8be9adf027 (diff)
Remove output from layout
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/container.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index d9bed7d8..e4c27d61 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -8,6 +8,7 @@
#include "sway/container.h"
#include "sway/layout.h"
#include "sway/output.h"
+#include "sway/server.h"
#include "sway/view.h"
#include "sway/workspace.h"
#include "log.h"
@@ -172,6 +173,7 @@ swayc_t *destroy_output(swayc_t *output) {
if (!sway_assert(output, "null output passed to destroy_output")) {
return NULL;
}
+
if (output->children->length > 0) {
// TODO save workspaces when there are no outputs.
// TODO also check if there will ever be no outputs except for exiting
@@ -190,9 +192,11 @@ swayc_t *destroy_output(swayc_t *output) {
arrange_windows(root_container.children->items[p], -1, -1);
}
}
+
sway_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name);
free_swayc(output);
update_root_geometry();
+
return &root_container;
}