aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/container.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-25 20:56:23 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-26 08:27:07 +1000
commit27a20a488465468511de9b2307941ac1bc4db8bf (patch)
treec5c1aff483cb089870ffebec00869347eec29f4c /include/sway/tree/container.h
parentMerge pull request #2330 from progandy/set-modifier-locks (diff)
downloadsway-27a20a488465468511de9b2307941ac1bc4db8bf.tar.gz
sway-27a20a488465468511de9b2307941ac1bc4db8bf.tar.zst
sway-27a20a488465468511de9b2307941ac1bc4db8bf.zip
Allow containers to be fullscreen
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r--include/sway/tree/container.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 2a4be18c..c584cd92 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -60,6 +60,8 @@ struct sway_container_state {
60 double swayc_x, swayc_y; 60 double swayc_x, swayc_y;
61 double swayc_width, swayc_height; 61 double swayc_width, swayc_height;
62 62
63 bool is_fullscreen;
64
63 bool has_gaps; 65 bool has_gaps;
64 double current_gaps; 66 double current_gaps;
65 double gaps_inner; 67 double gaps_inner;
@@ -74,7 +76,6 @@ struct sway_container_state {
74 // View properties 76 // View properties
75 double view_x, view_y; 77 double view_x, view_y;
76 double view_width, view_height; 78 double view_width, view_height;
77 bool is_fullscreen;
78 79
79 enum sway_container_border border; 80 enum sway_container_border border;
80 int border_thickness; 81 int border_thickness;
@@ -84,7 +85,7 @@ struct sway_container_state {
84 bool border_right; 85 bool border_right;
85 86
86 // Workspace properties 87 // Workspace properties
87 struct sway_view *ws_fullscreen; 88 struct sway_container *ws_fullscreen;
88 struct sway_container *ws_floating; 89 struct sway_container *ws_floating;
89}; 90};
90 91
@@ -124,6 +125,8 @@ struct sway_container {
124 double saved_x, saved_y; 125 double saved_x, saved_y;
125 double saved_width, saved_height; 126 double saved_width, saved_height;
126 127
128 bool is_fullscreen;
129
127 // The gaps currently applied to the container. 130 // The gaps currently applied to the container.
128 double current_gaps; 131 double current_gaps;
129 132
@@ -335,4 +338,20 @@ bool container_has_urgent_child(struct sway_container *container);
335 */ 338 */
336void container_end_mouse_operation(struct sway_container *container); 339void container_end_mouse_operation(struct sway_container *container);
337 340
341void container_set_fullscreen(struct sway_container *container, bool enable);
342
343/**
344 * Return true if the container is fullscreen, or a child of a fullscreen split
345 * container.
346 */
347bool container_is_fullscreen_or_child(struct sway_container *container);
348
349/**
350 * Wrap the children of parent in a new container. The new container will be the
351 * only child of parent.
352 *
353 * The new container is returned.
354 */
355struct sway_container *container_wrap_children(struct sway_container *parent);
356
338#endif 357#endif