diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 10:31:21 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-30 10:47:19 -0400 |
commit | 01af34391267e91461a4ab7a1234dd58f45d2c93 (patch) | |
tree | ae5197dabda270035b383d45b5c113afab2ebfbd /include | |
parent | Fix crash when override redirect views close (diff) | |
download | sway-01af34391267e91461a4ab7a1234dd58f45d2c93.tar.gz sway-01af34391267e91461a4ab7a1234dd58f45d2c93.tar.zst sway-01af34391267e91461a4ab7a1234dd58f45d2c93.zip |
Destroy empty workspaces when moving away
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/tree/container.h | 8 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 3bb497db..24e8468e 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -99,8 +99,13 @@ struct sway_container *container_view_create( | |||
99 | 99 | ||
100 | struct sway_container *container_output_destroy(struct sway_container *output); | 100 | struct sway_container *container_output_destroy(struct sway_container *output); |
101 | 101 | ||
102 | struct sway_container *container_workspace_destroy( | ||
103 | struct sway_container *workspace); | ||
104 | |||
102 | struct sway_container *container_view_destroy(struct sway_container *view); | 105 | struct sway_container *container_view_destroy(struct sway_container *view); |
103 | 106 | ||
107 | void container_destroy(struct sway_container *cont); | ||
108 | |||
104 | struct sway_container *container_set_layout(struct sway_container *container, | 109 | struct sway_container *container_set_layout(struct sway_container *container, |
105 | enum sway_container_layout layout); | 110 | enum sway_container_layout layout); |
106 | 111 | ||
@@ -140,4 +145,7 @@ void container_for_each_descendant_bfs(struct sway_container *container, | |||
140 | void container_for_each_descendant_dfs(struct sway_container *container, | 145 | void container_for_each_descendant_dfs(struct sway_container *container, |
141 | void (*f)(struct sway_container *container, void *data), void *data); | 146 | void (*f)(struct sway_container *container, void *data), void *data); |
142 | 147 | ||
148 | bool container_has_anscestor(struct sway_container *descendant, | ||
149 | struct sway_container *anscestor); | ||
150 | |||
143 | #endif | 151 | #endif |
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index ad52bdb0..8239366b 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h | |||
@@ -39,6 +39,9 @@ struct sway_container *container_add_sibling(struct sway_container *parent, | |||
39 | 39 | ||
40 | struct sway_container *container_remove_child(struct sway_container *child); | 40 | struct sway_container *container_remove_child(struct sway_container *child); |
41 | 41 | ||
42 | void container_move_to(struct sway_container* container, | ||
43 | struct sway_container* destination); | ||
44 | |||
42 | enum sway_container_layout container_get_default_layout(struct sway_container *output); | 45 | enum sway_container_layout container_get_default_layout(struct sway_container *output); |
43 | 46 | ||
44 | void container_sort_workspaces(struct sway_container *output); | 47 | void container_sort_workspaces(struct sway_container *output); |