aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorBrian Ashworth <RedSoxFan@users.noreply.github.com>2018-07-25 21:30:56 -0400
committerGitHub <noreply@github.com>2018-07-25 21:30:56 -0400
commit75ebeb4a167ca218af37fa9041223a6450dc20f4 (patch)
tree47456198945ceea9f105dc9122ebbdf2013872ce /include/sway
parentc8dc9b3b3094c9b2778309855114b9495518c2d4 (diff)
parent868dcde14ef2116fcbd5c2c66badf2bcc514bba3 (diff)
downloadsway-75ebeb4a167ca218af37fa9041223a6450dc20f4.tar.xz
Merge pull request #2356 from RyanDwyer/fullscreen-containers
Allow containers to be fullscreen
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/tree/container.h23
-rw-r--r--include/sway/tree/view.h6
-rw-r--r--include/sway/tree/workspace.h2
3 files changed, 22 insertions, 9 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 {
double swayc_x, swayc_y;
double swayc_width, swayc_height;
+ bool is_fullscreen;
+
bool has_gaps;
double current_gaps;
double gaps_inner;
@@ -74,7 +76,6 @@ struct sway_container_state {
// View properties
double view_x, view_y;
double view_width, view_height;
- bool is_fullscreen;
enum sway_container_border border;
int border_thickness;
@@ -84,7 +85,7 @@ struct sway_container_state {
bool border_right;
// Workspace properties
- struct sway_view *ws_fullscreen;
+ struct sway_container *ws_fullscreen;
struct sway_container *ws_floating;
};
@@ -124,6 +125,8 @@ struct sway_container {
double saved_x, saved_y;
double saved_width, saved_height;
+ bool is_fullscreen;
+
// The gaps currently applied to the container.
double current_gaps;
@@ -335,4 +338,20 @@ bool container_has_urgent_child(struct sway_container *container);
*/
void container_end_mouse_operation(struct sway_container *container);
+void container_set_fullscreen(struct sway_container *container, bool enable);
+
+/**
+ * Return true if the container is fullscreen, or a child of a fullscreen split
+ * container.
+ */
+bool container_is_fullscreen_or_child(struct sway_container *container);
+
+/**
+ * Wrap the children of parent in a new container. The new container will be the
+ * only child of parent.
+ *
+ * The new container is returned.
+ */
+struct sway_container *container_wrap_children(struct sway_container *parent);
+
#endif
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 1972447b..7086314f 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -69,8 +69,6 @@ struct sway_view {
// Used when changing a view from tiled to floating.
int natural_width, natural_height;
- bool is_fullscreen;
-
char *title_format;
enum sway_container_border border;
int border_thickness;
@@ -251,10 +249,6 @@ void view_set_activated(struct sway_view *view, bool activated);
void view_set_tiled(struct sway_view *view, bool tiled);
-void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen);
-
-void view_set_fullscreen(struct sway_view *view, bool fullscreen);
-
void view_close(struct sway_view *view);
void view_damage_from(struct sway_view *view);
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index ff66da6b..5ae0ae3a 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -7,7 +7,7 @@ struct sway_view;
struct sway_workspace {
struct sway_container *swayc;
- struct sway_view *fullscreen;
+ struct sway_container *fullscreen;
struct sway_container *floating;
list_t *output_priority;
bool urgent;