summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-06-04 14:28:43 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-06-07 10:46:14 +0200
commit53dc83fb68d2da079f2595994af41cc6b9acbeea (patch)
tree7532ea7ae132fcb592779b69606a54c6205dbbd9 /include
parentcommon/util: fix `get_current_time_msec` returning microseconds (diff)
downloadsway-53dc83fb68d2da079f2595994af41cc6b9acbeea.tar.gz
sway-53dc83fb68d2da079f2595994af41cc6b9acbeea.tar.zst
sway-53dc83fb68d2da079f2595994af41cc6b9acbeea.zip
tree/container: introduce `container_toplevel_ancestor` helper
This allows us to not have to explicitly write the same while loop everywhere.
Diffstat (limited to 'include')
-rw-r--r--include/sway/tree/container.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 8d2d8827..fd028131 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -273,6 +273,13 @@ void container_set_fullscreen(struct sway_container *con,
273void container_fullscreen_disable(struct sway_container *con); 273void container_fullscreen_disable(struct sway_container *con);
274 274
275/** 275/**
276 * Walk up the container tree branch starting at the given container, and return
277 * its earliest ancestor.
278 */
279struct sway_container *container_toplevel_ancestor(
280 struct sway_container *container);
281
282/**
276 * Return true if the container is floating, or a child of a floating split 283 * Return true if the container is floating, or a child of a floating split
277 * container. 284 * container.
278 */ 285 */