From f3ab895916ca1a0f004b5ceaefa90eee90676532 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 4 May 2018 08:24:25 -0400 Subject: Implement `floating enable` --- include/sway/tree/container.h | 3 +++ include/sway/tree/layout.h | 3 +++ include/sway/tree/workspace.h | 1 + 3 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index bb6c04a6..fa2f9286 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -76,6 +76,9 @@ struct sway_container { enum sway_container_layout layout; enum sway_container_layout prev_layout; + // Saves us from searching the list of children/floating in the parent + bool is_floating; + // For C_ROOT, this has no meaning // For C_OUTPUT, this is the output position in layout coordinates // For other types, this is the position in output-local coordinates diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index 2e0f2abf..33d0a5d0 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h @@ -46,6 +46,9 @@ struct sway_container *container_add_sibling(struct sway_container *parent, struct sway_container *container_remove_child(struct sway_container *child); +void container_add_floating(struct sway_container *workspace, + struct sway_container *child); + struct sway_container *container_replace_child(struct sway_container *child, struct sway_container *new_child); diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h index 35e1df3b..ece0ab5c 100644 --- a/include/sway/tree/workspace.h +++ b/include/sway/tree/workspace.h @@ -8,6 +8,7 @@ struct sway_view; struct sway_workspace { struct sway_container *swayc; struct sway_view *fullscreen; + list_t *floating; }; extern char *prev_workspace_name; -- cgit v1.2.3-54-g00ecf