diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-02-22 19:33:08 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-02-22 23:55:22 +0100 |
commit | 2c917a8c3453ec54a80581d82bc8a520e822bd56 (patch) | |
tree | c589766a5462e0e6855ba2b135c0c050804fb830 /include/sway | |
parent | render: scale titlebars correctly when straddling outputs (diff) | |
download | sway-2c917a8c3453ec54a80581d82bc8a520e822bd56.tar.gz sway-2c917a8c3453ec54a80581d82bc8a520e822bd56.tar.zst sway-2c917a8c3453ec54a80581d82bc8a520e822bd56.zip |
container: Add container_is_current_floating
Needed to check if containers are currently floating from render code,
as container_is_floating checks pending state.
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/tree/container.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index ff3f9599..5c368df2 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -210,10 +210,17 @@ void container_set_geometry_from_content(struct sway_container *con); | |||
210 | /** | 210 | /** |
211 | * Determine if the given container is itself floating. | 211 | * Determine if the given container is itself floating. |
212 | * This will return false for any descendants of a floating container. | 212 | * This will return false for any descendants of a floating container. |
213 | * | ||
214 | * Uses pending container state. | ||
213 | */ | 215 | */ |
214 | bool container_is_floating(struct sway_container *container); | 216 | bool container_is_floating(struct sway_container *container); |
215 | 217 | ||
216 | /** | 218 | /** |
219 | * Same as above, but for current container state. | ||
220 | */ | ||
221 | bool container_is_current_floating(struct sway_container *container); | ||
222 | |||
223 | /** | ||
217 | * Get a container's box in layout coordinates. | 224 | * Get a container's box in layout coordinates. |
218 | */ | 225 | */ |
219 | void container_get_box(struct sway_container *container, struct wlr_box *box); | 226 | void container_get_box(struct sway_container *container, struct wlr_box *box); |