diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-25 09:10:35 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-01 23:14:58 +1000 |
commit | 34f35f0badc767d9b0cbaf2fd429af1d30592d08 (patch) | |
tree | 1cc3a747d8e07cb55fa2cc95d26e2b33c792d89f /sway/tree/container.c | |
parent | Implement floating (diff) | |
download | sway-34f35f0badc767d9b0cbaf2fd429af1d30592d08.tar.gz sway-34f35f0badc767d9b0cbaf2fd429af1d30592d08.tar.zst sway-34f35f0badc767d9b0cbaf2fd429af1d30592d08.zip |
Use L_FLOATING instead of reapable boolean
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 10 |
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) { | |||
123 | c->layout = L_NONE; | 123 | c->layout = L_NONE; |
124 | c->type = type; | 124 | c->type = type; |
125 | c->alpha = 1.0f; | 125 | c->alpha = 1.0f; |
126 | c->reapable = true; | ||
127 | 126 | ||
128 | if (type != C_VIEW) { | 127 | if (type != C_VIEW) { |
129 | c->children = create_list(); | 128 | c->children = create_list(); |
@@ -280,7 +279,8 @@ static void container_root_finish(struct sway_container *con) { | |||
280 | } | 279 | } |
281 | 280 | ||
282 | bool container_reap_empty(struct sway_container *con) { | 281 | bool container_reap_empty(struct sway_container *con) { |
283 | if (!con->reapable) { | 282 | if (con->layout == L_FLOATING) { |
283 | // Don't reap the magical floating container that each workspace has | ||
284 | return false; | 284 | return false; |
285 | } | 285 | } |
286 | switch (con->type) { | 286 | switch (con->type) { |
@@ -618,6 +618,9 @@ struct sway_container *container_at(struct sway_container *parent, | |||
618 | return container_at_tabbed(parent, ox, oy, surface, sx, sy); | 618 | return container_at_tabbed(parent, ox, oy, surface, sx, sy); |
619 | case L_STACKED: | 619 | case L_STACKED: |
620 | return container_at_stacked(parent, ox, oy, surface, sx, sy); | 620 | return container_at_stacked(parent, ox, oy, surface, sx, sy); |
621 | case L_FLOATING: | ||
622 | sway_assert(false, "Didn't expect to see floating here"); | ||
623 | return NULL; | ||
621 | case L_NONE: | 624 | case L_NONE: |
622 | return NULL; | 625 | return NULL; |
623 | } | 626 | } |
@@ -842,6 +845,9 @@ static size_t get_tree_representation(struct sway_container *parent, char *buffe | |||
842 | case L_STACKED: | 845 | case L_STACKED: |
843 | lenient_strcat(buffer, "S["); | 846 | lenient_strcat(buffer, "S["); |
844 | break; | 847 | break; |
848 | case L_FLOATING: | ||
849 | strcpy(buffer, "F["); | ||
850 | break; | ||
845 | case L_NONE: | 851 | case L_NONE: |
846 | lenient_strcat(buffer, "D["); | 852 | lenient_strcat(buffer, "D["); |
847 | break; | 853 | break; |