aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/layout.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-29 11:06:07 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-29 11:08:19 +1000
commit415a48ac6387a62a59adb8ed1168e851509a0ce3 (patch)
treefd0027a67439414e164318182be29a3529805543 /sway/commands/layout.c
parentMerge pull request #2724 from RedSoxFan/update-man-pages (diff)
downloadsway-415a48ac6387a62a59adb8ed1168e851509a0ce3.tar.gz
sway-415a48ac6387a62a59adb8ed1168e851509a0ce3.tar.zst
sway-415a48ac6387a62a59adb8ed1168e851509a0ce3.zip
Make gaps implementation consistent with i3-gaps
This changes our gaps implementation to behave like i3-gaps. Our previous implementation allowed you to set gaps on a per container basis. This isn't supported by i3-gaps and doesn't seem to have a practical use case. The gaps_outer and gaps_inner properties on containers are now removed as they just read the gaps_inner from the workspace. `gaps inner|outer <px>` no longer changes the gaps for all workspaces. It only sets defaults for new workspaces. `gaps inner|outer current|workspace|all set|plus|minus <px>` is now runtime only, and the workspace option is now removed. `current` now sets gaps for the current workspace as opposed to the current container. `workspace <ws> gaps inner|outer <px>` is now implemented. This sets defaults for a workspace. This also fixes a bug where changing the layout of a split container from linear to tabbed would cause gaps to not be applied to it until you switch to another workspace and back.
Diffstat (limited to 'sway/commands/layout.c')
-rw-r--r--sway/commands/layout.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index ef3ec1cb..c2ce2e78 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -138,15 +138,14 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
138 } 138 }
139 container->layout = new_layout; 139 container->layout = new_layout;
140 container_update_representation(container); 140 container_update_representation(container);
141 arrange_container(container);
142 } else { 141 } else {
143 if (old_layout != L_TABBED && old_layout != L_STACKED) { 142 if (old_layout != L_TABBED && old_layout != L_STACKED) {
144 workspace->prev_split_layout = old_layout; 143 workspace->prev_split_layout = old_layout;
145 } 144 }
146 workspace->layout = new_layout; 145 workspace->layout = new_layout;
147 workspace_update_representation(workspace); 146 workspace_update_representation(workspace);
148 arrange_workspace(workspace);
149 } 147 }
148 arrange_workspace(workspace);
150 } 149 }
151 150
152 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 151 return cmd_results_new(CMD_SUCCESS, NULL, NULL);