aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2019-11-04 15:10:40 -0700
committerBrian Ashworth <bosrsf04@gmail.com>2019-11-04 21:16:27 -0500
commit3975ca28c2e870eb3f40bbd43a90354743f7ccf1 (patch)
treed35aa9aa8b0c17e94fb24359a13ab83547cafae5 /sway/commands
parent38b37247ff26b7c0926a8d31c1a91f818d1f5d84 (diff)
smart_borders: separate smartness from edge types
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/hide_edge_borders.c7
-rw-r--r--sway/commands/smart_borders.c8
2 files changed, 7 insertions, 8 deletions
diff --git a/sway/commands/hide_edge_borders.c b/sway/commands/hide_edge_borders.c
index f69bece1..9a1d8445 100644
--- a/sway/commands/hide_edge_borders.c
+++ b/sway/commands/hide_edge_borders.c
@@ -32,14 +32,15 @@ struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
} else if (strcmp(argv[0], "both") == 0) {
config->hide_edge_borders = E_BOTH;
} else if (strcmp(argv[0], "smart") == 0) {
- config->hide_edge_borders = E_SMART;
+ config->hide_edge_borders = E_NONE;
+ config->hide_edge_borders_smart = ESMART_ON;
} else if (strcmp(argv[0], "smart_no_gaps") == 0) {
- config->hide_edge_borders = E_SMART_NO_GAPS;
+ config->hide_edge_borders = E_NONE;
+ config->hide_edge_borders_smart = ESMART_NO_GAPS;
} else {
return cmd_results_new(CMD_INVALID, expected_syntax);
}
config->hide_lone_tab = hide_lone_tab;
- config->saved_edge_borders = config->hide_edge_borders;
arrange_root();
diff --git a/sway/commands/smart_borders.c b/sway/commands/smart_borders.c
index be346106..73878679 100644
--- a/sway/commands/smart_borders.c
+++ b/sway/commands/smart_borders.c
@@ -10,14 +10,12 @@ struct cmd_results *cmd_smart_borders(int argc, char **argv) {
return error;
}
- enum edge_border_types saved = config->hide_edge_borders;
if (strcmp(argv[0], "no_gaps") == 0) {
- config->hide_edge_borders = E_SMART_NO_GAPS;
+ config->hide_edge_borders_smart = ESMART_NO_GAPS;
} else {
- config->hide_edge_borders = parse_boolean(argv[0], true) ?
- E_SMART : config->saved_edge_borders;
+ config->hide_edge_borders_smart = parse_boolean(argv[0], true) ?
+ ESMART_ON : ESMART_OFF;
}
- config->saved_edge_borders = saved;
arrange_root();