summaryrefslogtreecommitdiffstats
path: root/sway/commands/smart_gaps.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/smart_gaps.c')
-rw-r--r--sway/commands/smart_gaps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/commands/smart_gaps.c b/sway/commands/smart_gaps.c
index 38700d65..f687e78e 100644
--- a/sway/commands/smart_gaps.c
+++ b/sway/commands/smart_gaps.c
@@ -16,13 +16,14 @@ struct cmd_results *cmd_smart_gaps(int argc, char **argv) {
16 16
17 if (strcmp(argv[0], "on") == 0) { 17 if (strcmp(argv[0], "on") == 0) {
18 config->smart_gaps = true; 18 config->smart_gaps = true;
19 arrange_root();
20 } else if (strcmp(argv[0], "off") == 0) { 19 } else if (strcmp(argv[0], "off") == 0) {
21 config->smart_gaps = false; 20 config->smart_gaps = false;
22 arrange_root();
23 } else { 21 } else {
24 return cmd_results_new(CMD_INVALID, "smart_gaps", 22 return cmd_results_new(CMD_INVALID, "smart_gaps",
25 "Expected 'smart_gaps <on|off>' "); 23 "Expected 'smart_gaps <on|off>' ");
26 } 24 }
25
26 arrange_and_commit(&root_container);
27
27 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 28 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
28} 29}