diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2018-05-25 09:26:23 +1000 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2018-05-25 09:26:23 +1000 |
| commit | 05f5fe3cfaad1f3b9fe6d4fcf1e6fc4f05f2a84b (patch) | |
| tree | 7e7c2f6fcd80a6a48e07e07e03c5f2dc0d248240 /include | |
| parent | 096675079b604ddbb1c41e27d9095029f99e9016 (diff) | |
Replace is_floating boolean with function
Diffstat (limited to 'include')
| -rw-r--r-- | include/sway/tree/container.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 906088f0..71935697 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -76,8 +76,6 @@ struct sway_container { enum sway_container_layout layout; enum sway_container_layout prev_layout; - // Saves us from searching the list of children/floating in the parent - bool is_floating; bool is_sticky; // For C_ROOT, this has no meaning @@ -243,8 +241,14 @@ void container_set_floating(struct sway_container *container, bool enable); void container_set_geometry_from_view(struct sway_container *container); /** - * Determine if the given container is itself floating or has a floating - * ancestor. + * Determine if the given container is itself floating. + * This will return false for any descendants of a floating container. + */ +bool container_is_floating(struct sway_container *container); + +/** + * Determine if the given container is itself floating or is a child of a + * floating container. */ bool container_self_or_parent_floating(struct sway_container *container); |
