aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/layout.c
diff options
context:
space:
mode:
authorLibravatar wil <william.barsse@gmail.com>2017-01-01 19:53:53 +0100
committerLibravatar wil <william.barsse@gmail.com>2017-01-01 19:53:53 +0100
commita62048f15d9381e3040bd45965233e59a041eab7 (patch)
tree52e898bed50efcefe3d526db696d16f8888bc2f0 /sway/commands/layout.c
parent[fix] cycle auto layouts backwards (diff)
downloadsway-a62048f15d9381e3040bd45965233e59a041eab7.tar.gz
sway-a62048f15d9381e3040bd45965233e59a041eab7.tar.zst
sway-a62048f15d9381e3040bd45965233e59a041eab7.zip
changed "layout promote" command to "move first"
This is more consistent with other Sway semantics.
Diffstat (limited to 'sway/commands/layout.c')
-rw-r--r--sway/commands/layout.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index d908b95c..2da65765 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -117,18 +117,6 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
117 "Must be one of <prev|next>."); 117 "Must be one of <prev|next>.");
118 } 118 }
119 swayc_change_layout(parent, layout); 119 swayc_change_layout(parent, layout);
120 } else if (strcasecmp(argv[0], "promote") == 0) {
121 // swap first child in auto layout with currently focused child
122 swayc_t *container = get_focused_view(swayc_active_workspace());
123 swayc_t *parent = container->parent;
124 if (is_auto_layout(parent->layout)) {
125 int focused_idx = index_child(container);
126 swayc_t *first = parent->children->items[0];
127 if (focused_idx > 0) {
128 list_swap(parent->children, 0, focused_idx);
129 swap_geometry(first, container);
130 }
131 }
132 } 120 }
133 } 121 }
134 122