aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/workspace.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-19 15:07:07 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-19 16:18:33 +1000
commit2b5a404ac920339a2b9ce32d4718272dee4668b9 (patch)
tree681f45a530a1f8d5966161291c3cb482e52edb6e /include/sway/tree/workspace.h
parentMerge pull request #2453 from ianyfan/commands (diff)
downloadsway-2b5a404ac920339a2b9ce32d4718272dee4668b9.tar.gz
sway-2b5a404ac920339a2b9ce32d4718272dee4668b9.tar.zst
sway-2b5a404ac920339a2b9ce32d4718272dee4668b9.zip
Replace hacky L_FLOATING container with a list
Workspaces previously had a magical `workspace->floating` container, which had a layout of L_FLOATING and whose children were actual floating views. This allowed some conveniences, but was a hacky solution because the container has to be exempt from focus, coordinate transactions with the workspace, and omit emitting IPC events (which we didn't do). This commit changes it to be a list directly in the sway_workspace. The L_FLOATING layout is no longer used so this has been removed as well. * Fixes incorrect check in the swap command (it checked if the containers had the L_FLOATING layout, but this layout applied to the magical container). * Introduces workspace_add_floating
Diffstat (limited to 'include/sway/tree/workspace.h')
-rw-r--r--include/sway/tree/workspace.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index c9dbb538..35c91017 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -9,7 +9,7 @@ struct sway_view;
9struct sway_workspace { 9struct sway_workspace {
10 struct sway_container *swayc; 10 struct sway_container *swayc;
11 struct sway_container *fullscreen; 11 struct sway_container *fullscreen;
12 struct sway_container *floating; 12 list_t *floating; // struct sway_container
13 list_t *output_priority; 13 list_t *output_priority;
14 bool urgent; 14 bool urgent;
15}; 15};
@@ -63,4 +63,7 @@ struct sway_container *workspace_find_container(struct sway_container *ws,
63 */ 63 */
64struct sway_container *workspace_wrap_children(struct sway_container *ws); 64struct sway_container *workspace_wrap_children(struct sway_container *ws);
65 65
66void workspace_add_floating(struct sway_container *workspace,
67 struct sway_container *con);
68
66#endif 69#endif