aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/container.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-24 22:30:44 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commit1f2e399ade77070a2d0b82856ad9a3eef96b8676 (patch)
treec469197e140051aea912cb173723c7e55ce1e410 /include/sway/tree/container.h
parentSend frame done to floating views (diff)
downloadsway-1f2e399ade77070a2d0b82856ad9a3eef96b8676.tar.gz
sway-1f2e399ade77070a2d0b82856ad9a3eef96b8676.tar.zst
sway-1f2e399ade77070a2d0b82856ad9a3eef96b8676.zip
Implement floating
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r--include/sway/tree/container.h22
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 {
75 enum sway_container_layout layout; 75 enum sway_container_layout layout;
76 enum sway_container_layout prev_layout; 76 enum sway_container_layout prev_layout;
77 77
78 // Allow the container to be automatically removed if it's empty. True by
79 // default, false for the magic floating container that each workspace has.
80 bool reapable;
81
78 // Saves us from searching the list of children/floating in the parent 82 // Saves us from searching the list of children/floating in the parent
79 bool is_floating; 83 bool is_floating;
84 bool is_sticky;
80 85
81 // For C_ROOT, this has no meaning 86 // For C_ROOT, this has no meaning
82 // For C_OUTPUT, this is the output position in layout coordinates 87 // For C_OUTPUT, this is the output position in layout coordinates
@@ -174,6 +179,13 @@ struct sway_container *container_at(struct sway_container *container,
174 double *sx, double *sy); 179 double *sx, double *sy);
175 180
176/** 181/**
182 * Same as container_at, but only checks floating views and expects coordinates
183 * to be layout coordinates, as that's what floating views use.
184 */
185struct sway_container *floating_container_at(double lx, double ly,
186 struct wlr_surface **surface, double *sx, double *sy);
187
188/**
177 * Apply the function for each descendant of the container breadth first. 189 * Apply the function for each descendant of the container breadth first.
178 */ 190 */
179void container_for_each_descendant_bfs(struct sway_container *container, 191void container_for_each_descendant_bfs(struct sway_container *container,
@@ -229,4 +241,14 @@ void container_notify_subtree_changed(struct sway_container *container);
229 */ 241 */
230size_t container_titlebar_height(void); 242size_t container_titlebar_height(void);
231 243
244void container_set_floating(struct sway_container *container, bool enable);
245
246void container_set_geometry_from_view(struct sway_container *container);
247
248/**
249 * Determine if the given container is itself floating or has a floating
250 * ancestor.
251 */
252bool container_self_or_parent_floating(struct sway_container *container);
253
232#endif 254#endif