aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-08-18 09:30:13 -0400
committerGitHub <noreply@github.com>2018-08-18 09:30:13 -0400
commit5c779c11f6fc2ca214f64b905086dead170ae174 (patch)
treebf71a43528328a786be1a4de02781e6e83aea406 /sway/tree/workspace.c
parentcfe205b36fba77ba64184e0c1e8dcb211a7a8904 (diff)
parent16c663ed49e3950388901f220066e4da69956dfb (diff)
downloadsway-5c779c11f6fc2ca214f64b905086dead170ae174.tar.xz
Merge pull request #2481 from RyanDwyer/rename-functions
Rename container_sort_workspaces and container_wrap_children
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index e7383de0..1c0e6515 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -75,7 +75,7 @@ struct sway_container *workspace_create(struct sway_container *output,
workspace_output_add_priority(workspace, output);
container_add_child(output, workspace);
- container_sort_workspaces(output);
+ output_sort_workspaces(output);
container_create_notify(workspace);
return workspace;
@@ -537,3 +537,15 @@ void workspace_detect_urgent(struct sway_container *workspace) {
container_damage_whole(workspace);
}
}
+
+struct sway_container *workspace_wrap_children(struct sway_container *ws) {
+ struct sway_container *middle = container_create(C_CONTAINER);
+ middle->layout = ws->layout;
+ while (ws->children->length) {
+ struct sway_container *child = ws->children->items[0];
+ container_remove_child(child);
+ container_add_child(middle, child);
+ }
+ container_add_child(ws, middle);
+ return middle;
+}