aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-08 19:12:05 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-02-09 16:51:05 +0000
commit757768dbe5a61a5fbfc628ad554f26add0397e42 (patch)
tree7b100acca663f7ff28f7c431e8c755610957000f
parentinput/search/url: pass pointer-to key-binding struct to execute() (diff)
config: rename csd.color.close -> quit
This fixes a compilation error on FreeBSD: ../../foot/render.c:2055:45: error: no member named 'epoll_shim_close' in 'struct config::(anonymous at ../../foot/config.h:254:9)' conf_color = &term->conf->csd.color.close; ~~~~~~~~~~~~~~~~~~~~~ ^ /usr/local/include/libepoll-shim/epoll-shim/detail/common.h:8:15: note: expanded from macro 'close': #define close epoll_shim_close
-rw-r--r--config.c2
-rw-r--r--config.h2
-rw-r--r--render.c2
-rw-r--r--tests/test-config.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/config.c b/config.c
index bd28d408..37768a8e 100644
--- a/config.c
+++ b/config.c
@@ -1451,7 +1451,7 @@ parse_section_csd(struct context *ctx)
}
else if (strcmp(key, "button-close-color") == 0) {
- if (!value_to_color(ctx, &conf->csd.color.close, true))
+ if (!value_to_color(ctx, &conf->csd.color.quit, true))
return false;
conf->csd.color.close_set = true;
diff --git a/config.h b/config.h
index 927f4e5f..cd5bbd14 100644
--- a/config.h
+++ b/config.h
@@ -262,7 +262,7 @@ struct config {
uint32_t buttons;
uint32_t minimize;
uint32_t maximize;
- uint32_t close;
+ uint32_t quit; /* ‘close’ collides with #define in epoll-shim */
uint32_t border;
} color;
diff --git a/render.c b/render.c
index d873aa79..d6fd6d6b 100644
--- a/render.c
+++ b/render.c
@@ -2052,7 +2052,7 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx,
case CSD_SURF_CLOSE:
_color = term->conf->colors.table[1]; /* red */
is_set = term->conf->csd.color.close_set;
- conf_color = &term->conf->csd.color.close;
+ conf_color = &term->conf->csd.color.quit;
is_active = term->active_surface == TERM_SURF_BUTTON_CLOSE;
break;
diff --git a/tests/test-config.c b/tests/test-config.c
index be18a593..04149a59 100644
--- a/tests/test-config.c
+++ b/tests/test-config.c
@@ -665,7 +665,7 @@ test_section_csd(void)
test_color(&ctx, &parse_section_csd, "button-maximize-color", true,
&conf.csd.color.maximize);
test_color(&ctx, &parse_section_csd, "button-close-color", true,
- &conf.csd.color.close);
+ &conf.csd.color.quit);
/* TODO: verify the ‘set’ bit is actually set for colors */
/* TODO: font */