aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/hide_edge_borders.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/hide_edge_borders.c')
-rw-r--r--sway/commands/hide_edge_borders.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sway/commands/hide_edge_borders.c b/sway/commands/hide_edge_borders.c
index 0a5c7f28..ea261fb1 100644
--- a/sway/commands/hide_edge_borders.c
+++ b/sway/commands/hide_edge_borders.c
@@ -1,15 +1,8 @@
#include "sway/commands.h"
#include "sway/config.h"
-#include "sway/tree/container.h"
-#include "sway/tree/root.h"
+#include "sway/tree/arrange.h"
#include "sway/tree/view.h"
-static void _configure_view(struct sway_container *con, void *data) {
- if (con->view) {
- view_autoconfigure(con->view);
- }
-}
-
struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "hide_edge_borders", EXPECTED_EQUAL_TO, 1))) {
@@ -26,13 +19,16 @@ struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
config->hide_edge_borders = E_BOTH;
} else if (strcmp(argv[0], "smart") == 0) {
config->hide_edge_borders = E_SMART;
+ } else if (strcmp(argv[0], "smart_no_gaps") == 0) {
+ config->hide_edge_borders = E_SMART_NO_GAPS;
} else {
return cmd_results_new(CMD_INVALID, "hide_edge_borders",
"Expected 'hide_edge_borders "
- "<none|vertical|horizontal|both|smart>'");
+ "<none|vertical|horizontal|both|smart|smart_no_gaps>'");
}
+ config->saved_edge_borders = config->hide_edge_borders;
- root_for_each_container(_configure_view, NULL);
+ arrange_root();
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}