aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-25 09:10:35 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commit34f35f0badc767d9b0cbaf2fd429af1d30592d08 (patch)
tree1cc3a747d8e07cb55fa2cc95d26e2b33c792d89f /sway/tree/container.c
parent1f2e399ade77070a2d0b82856ad9a3eef96b8676 (diff)
Use L_FLOATING instead of reapable boolean
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index f9a0474c..17d29d92 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -123,7 +123,6 @@ struct sway_container *container_create(enum sway_container_type type) {
c->layout = L_NONE;
c->type = type;
c->alpha = 1.0f;
- c->reapable = true;
if (type != C_VIEW) {
c->children = create_list();
@@ -280,7 +279,8 @@ static void container_root_finish(struct sway_container *con) {
}
bool container_reap_empty(struct sway_container *con) {
- if (!con->reapable) {
+ if (con->layout == L_FLOATING) {
+ // Don't reap the magical floating container that each workspace has
return false;
}
switch (con->type) {
@@ -618,6 +618,9 @@ struct sway_container *container_at(struct sway_container *parent,
return container_at_tabbed(parent, ox, oy, surface, sx, sy);
case L_STACKED:
return container_at_stacked(parent, ox, oy, surface, sx, sy);
+ case L_FLOATING:
+ sway_assert(false, "Didn't expect to see floating here");
+ return NULL;
case L_NONE:
return NULL;
}
@@ -842,6 +845,9 @@ static size_t get_tree_representation(struct sway_container *parent, char *buffe
case L_STACKED:
lenient_strcat(buffer, "S[");
break;
+ case L_FLOATING:
+ strcpy(buffer, "F[");
+ break;
case L_NONE:
lenient_strcat(buffer, "D[");
break;