aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOrestis Floros <orestisflo@gmail.com>2024-01-30 08:53:32 +0100
committerGitHub <noreply@github.com>2024-01-30 08:53:32 +0100
commit230147c81547848c83ac7764a6c1691f26f10e05 (patch)
tree257606a954e8a4dde809e13dcc31224b32d54676 /src
parentc3173af2f1ec89e4ef1e73da4ec48528c7f8f124 (diff)
downloadi3-230147c81547848c83ac7764a6c1691f26f10e05.tar.gz
i3-230147c81547848c83ac7764a6c1691f26f10e05.zip
smart_borders: Deprecate option (#5889)
This had pretty much identical behaviour to hide_edge_borders which made it confusing. The `hide_edge_borders smart_no_gaps` implementation has an extra check which fixes #5406.
Diffstat (limited to 'src')
-rw-r--r--src/con.c4
-rw-r--r--src/config_directives.c16
2 files changed, 12 insertions, 8 deletions
diff --git a/src/con.c b/src/con.c
index c4d3fb61..aebc46cf 100644
--- a/src/con.c
+++ b/src/con.c
@@ -1824,9 +1824,7 @@ bool con_draw_decoration_into_frame(Con *con) {
}
static Rect con_border_style_rect_without_title(Con *con) {
- if ((config.smart_borders == SMART_BORDERS_ON && con_num_visible_children(con_get_workspace(con)) <= 1) ||
- (config.smart_borders == SMART_BORDERS_NO_GAPS && !has_outer_gaps(calculate_effective_gaps(con))) ||
- (config.hide_edge_borders == HEBM_SMART && con_num_visible_children(con_get_workspace(con)) <= 1) ||
+ if ((config.hide_edge_borders == HEBM_SMART && con_num_visible_children(con_get_workspace(con)) <= 1) ||
(config.hide_edge_borders == HEBM_SMART_NO_GAPS && con_num_visible_children(con_get_workspace(con)) <= 1 && !has_outer_gaps(calculate_effective_gaps(con)))) {
if (!con_is_floating(con)) {
return (Rect){0, 0, 0, 0};
diff --git a/src/config_directives.c b/src/config_directives.c
index 36154ce3..da9da964 100644
--- a/src/config_directives.c
+++ b/src/config_directives.c
@@ -327,9 +327,15 @@ CFGFUN(gaps, const char *workspace, const char *scope, const long value) {
CFGFUN(smart_borders, const char *enable) {
if (!strcmp(enable, "no_gaps")) {
- config.smart_borders = SMART_BORDERS_NO_GAPS;
- } else {
- config.smart_borders = boolstr(enable) ? SMART_BORDERS_ON : SMART_BORDERS_OFF;
+ config.hide_edge_borders = HEBM_SMART_NO_GAPS;
+ } else if (boolstr(enable)) {
+ if (config.hide_edge_borders == HEBM_NONE) {
+ /* Only enable this if hide_edge_borders is at the default value as it otherwise takes precedence */
+ config.hide_edge_borders = HEBM_SMART;
+ } else {
+ ELOG("Both hide_edge_borders and smart_borders was used. "
+ "Ignoring smart_borders as it is deprecated.\n");
+ }
}
}
@@ -808,12 +814,12 @@ static void bar_configure_binding(const char *button, const char *release, const
}
CFGFUN(bar_wheel_up_cmd, const char *command) {
- ELOG("'wheel_up_cmd' is deprecated. Please us 'bindsym button4 %s' instead.\n", command);
+ ELOG("'wheel_up_cmd' is deprecated. Please use 'bindsym button4 %s' instead.\n", command);
bar_configure_binding("button4", NULL, command);
}
CFGFUN(bar_wheel_down_cmd, const char *command) {
- ELOG("'wheel_down_cmd' is deprecated. Please us 'bindsym button5 %s' instead.\n", command);
+ ELOG("'wheel_down_cmd' is deprecated. Please use 'bindsym button5 %s' instead.\n", command);
bar_configure_binding("button5", NULL, command);
}