aboutsummaryrefslogtreecommitdiff
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) {
if (strcmp(argv[0], "on") == 0) {
config->smart_gaps = true;
- arrange_root();
} else if (strcmp(argv[0], "off") == 0) {
config->smart_gaps = false;
- arrange_root();
} else {
return cmd_results_new(CMD_INVALID, "smart_gaps",
"Expected 'smart_gaps <on|off>' ");
}
+
+ arrange_and_commit(&root_container);
+
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}