diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-24 22:30:44 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-01 23:14:58 +1000 |
commit | 1f2e399ade77070a2d0b82856ad9a3eef96b8676 (patch) | |
tree | c469197e140051aea912cb173723c7e55ce1e410 /include/sway/tree/container.h | |
parent | 1132efe42e8086216c7bab6b405d09a22231dde5 (diff) |
Implement floating
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r-- | include/sway/tree/container.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index a4ffd25b..b802e1d1 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -75,8 +75,13 @@ struct sway_container { enum sway_container_layout layout; enum sway_container_layout prev_layout; + // Allow the container to be automatically removed if it's empty. True by + // default, false for the magic floating container that each workspace has. + bool reapable; + // 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 // For C_OUTPUT, this is the output position in layout coordinates @@ -174,6 +179,13 @@ struct sway_container *container_at(struct sway_container *container, double *sx, double *sy); /** + * Same as container_at, but only checks floating views and expects coordinates + * to be layout coordinates, as that's what floating views use. + */ +struct sway_container *floating_container_at(double lx, double ly, + struct wlr_surface **surface, double *sx, double *sy); + +/** * Apply the function for each descendant of the container breadth first. */ void container_for_each_descendant_bfs(struct sway_container *container, @@ -229,4 +241,14 @@ void container_notify_subtree_changed(struct sway_container *container); */ size_t container_titlebar_height(void); +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. + */ +bool container_self_or_parent_floating(struct sway_container *container); + #endif |