aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/focus.c
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 /sway/commands/focus.c
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 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index fe15b4c7..6659a683 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -39,7 +39,7 @@ static struct cmd_results *focus_mode(struct sway_container *con,
39 // If the container is in a floating split container, 39 // If the container is in a floating split container,
40 // operate on the split container instead of the child. 40 // operate on the split container instead of the child.
41 if (container_is_floating_or_child(con)) { 41 if (container_is_floating_or_child(con)) {
42 while (con->parent->layout != L_FLOATING) { 42 while (con->parent->type != C_WORKSPACE) {
43 con = con->parent; 43 con = con->parent;
44 } 44 }
45 } 45 }