aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-18 21:54:09 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-18 22:02:03 +1000
commit16c663ed49e3950388901f220066e4da69956dfb (patch)
treebf71a43528328a786be1a4de02781e6e83aea406 /sway/tree/container.c
parentMerge pull request #2480 from RyanDwyer/fix-mod-resize (diff)
downloadsway-16c663ed49e3950388901f220066e4da69956dfb.tar.gz
sway-16c663ed49e3950388901f220066e4da69956dfb.tar.zst
sway-16c663ed49e3950388901f220066e4da69956dfb.zip
Rename container_sort_workspaces and container_wrap_children
This commit renames container_sort_workspaces to output_sort_workspaces and moves it to output.c. This also renames container_wrap_children to workspace_wrap_children and moves it to workspace.c. This function is only called with workspaces.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index db780270..337245fd 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -270,7 +270,7 @@ static struct sway_container *container_output_destroy(
270 container_destroy(workspace); 270 container_destroy(workspace);
271 } 271 }
272 272
273 container_sort_workspaces(new_output); 273 output_sort_workspaces(new_output);
274 } 274 }
275 } 275 }
276 } 276 }
@@ -1305,15 +1305,3 @@ bool container_is_fullscreen_or_child(struct sway_container *container) {
1305 1305
1306 return false; 1306 return false;
1307} 1307}
1308
1309struct sway_container *container_wrap_children(struct sway_container *parent) {
1310 struct sway_container *middle = container_create(C_CONTAINER);
1311 middle->layout = parent->layout;
1312 while (parent->children->length) {
1313 struct sway_container *child = parent->children->items[0];
1314 container_remove_child(child);
1315 container_add_child(middle, child);
1316 }
1317 container_add_child(parent, middle);
1318 return middle;
1319}