aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2017-12-09 15:48:52 +0100
committerLibravatar emersion <contact@emersion.fr>2017-12-09 15:48:52 +0100
commit4a14aa9ad99a6f316024e110332a0b482e231543 (patch)
tree2340e6dbc5ffd05c4e2c239d316b42482a474315 /sway/tree/container.c
parentAdd new_output_config, update root container size on output hotplug (diff)
downloadsway-4a14aa9ad99a6f316024e110332a0b482e231543.tar.gz
sway-4a14aa9ad99a6f316024e110332a0b482e231543.tar.zst
sway-4a14aa9ad99a6f316024e110332a0b482e231543.zip
Remove output from layout
Diffstat (limited to 'sway/tree/container.c')
-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 @@
8#include "sway/container.h" 8#include "sway/container.h"
9#include "sway/layout.h" 9#include "sway/layout.h"
10#include "sway/output.h" 10#include "sway/output.h"
11#include "sway/server.h"
11#include "sway/view.h" 12#include "sway/view.h"
12#include "sway/workspace.h" 13#include "sway/workspace.h"
13#include "log.h" 14#include "log.h"
@@ -172,6 +173,7 @@ swayc_t *destroy_output(swayc_t *output) {
172 if (!sway_assert(output, "null output passed to destroy_output")) { 173 if (!sway_assert(output, "null output passed to destroy_output")) {
173 return NULL; 174 return NULL;
174 } 175 }
176
175 if (output->children->length > 0) { 177 if (output->children->length > 0) {
176 // TODO save workspaces when there are no outputs. 178 // TODO save workspaces when there are no outputs.
177 // TODO also check if there will ever be no outputs except for exiting 179 // TODO also check if there will ever be no outputs except for exiting
@@ -190,9 +192,11 @@ swayc_t *destroy_output(swayc_t *output) {
190 arrange_windows(root_container.children->items[p], -1, -1); 192 arrange_windows(root_container.children->items[p], -1, -1);
191 } 193 }
192 } 194 }
195
193 sway_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name); 196 sway_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name);
194 free_swayc(output); 197 free_swayc(output);
195 update_root_geometry(); 198 update_root_geometry();
199
196 return &root_container; 200 return &root_container;
197} 201}
198 202