diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-18 21:54:09 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-18 22:02:03 +1000 |
commit | 16c663ed49e3950388901f220066e4da69956dfb (patch) | |
tree | bf71a43528328a786be1a4de02781e6e83aea406 /sway/tree/workspace.c | |
parent | Merge pull request #2480 from RyanDwyer/fix-mod-resize (diff) | |
download | sway-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/workspace.c')
-rw-r--r-- | sway/tree/workspace.c | 14 |
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, | |||
75 | workspace_output_add_priority(workspace, output); | 75 | workspace_output_add_priority(workspace, output); |
76 | 76 | ||
77 | container_add_child(output, workspace); | 77 | container_add_child(output, workspace); |
78 | container_sort_workspaces(output); | 78 | output_sort_workspaces(output); |
79 | container_create_notify(workspace); | 79 | container_create_notify(workspace); |
80 | 80 | ||
81 | return workspace; | 81 | return workspace; |
@@ -537,3 +537,15 @@ void workspace_detect_urgent(struct sway_container *workspace) { | |||
537 | container_damage_whole(workspace); | 537 | container_damage_whole(workspace); |
538 | } | 538 | } |
539 | } | 539 | } |
540 | |||
541 | struct sway_container *workspace_wrap_children(struct sway_container *ws) { | ||
542 | struct sway_container *middle = container_create(C_CONTAINER); | ||
543 | middle->layout = ws->layout; | ||
544 | while (ws->children->length) { | ||
545 | struct sway_container *child = ws->children->items[0]; | ||
546 | container_remove_child(child); | ||
547 | container_add_child(middle, child); | ||
548 | } | ||
549 | container_add_child(ws, middle); | ||
550 | return middle; | ||
551 | } | ||