mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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
This commit is contained in:
parent
fed90646d3
commit
757768dbe5
4 changed files with 4 additions and 4 deletions
2
config.c
2
config.c
|
|
@ -1451,7 +1451,7 @@ parse_section_csd(struct context *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (strcmp(key, "button-close-color") == 0) {
|
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;
|
return false;
|
||||||
|
|
||||||
conf->csd.color.close_set = true;
|
conf->csd.color.close_set = true;
|
||||||
|
|
|
||||||
2
config.h
2
config.h
|
|
@ -262,7 +262,7 @@ struct config {
|
||||||
uint32_t buttons;
|
uint32_t buttons;
|
||||||
uint32_t minimize;
|
uint32_t minimize;
|
||||||
uint32_t maximize;
|
uint32_t maximize;
|
||||||
uint32_t close;
|
uint32_t quit; /* ‘close’ collides with #define in epoll-shim */
|
||||||
uint32_t border;
|
uint32_t border;
|
||||||
} color;
|
} color;
|
||||||
|
|
||||||
|
|
|
||||||
2
render.c
2
render.c
|
|
@ -2052,7 +2052,7 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx,
|
||||||
case CSD_SURF_CLOSE:
|
case CSD_SURF_CLOSE:
|
||||||
_color = term->conf->colors.table[1]; /* red */
|
_color = term->conf->colors.table[1]; /* red */
|
||||||
is_set = term->conf->csd.color.close_set;
|
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;
|
is_active = term->active_surface == TERM_SURF_BUTTON_CLOSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -665,7 +665,7 @@ test_section_csd(void)
|
||||||
test_color(&ctx, &parse_section_csd, "button-maximize-color", true,
|
test_color(&ctx, &parse_section_csd, "button-maximize-color", true,
|
||||||
&conf.csd.color.maximize);
|
&conf.csd.color.maximize);
|
||||||
test_color(&ctx, &parse_section_csd, "button-close-color", true,
|
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: verify the ‘set’ bit is actually set for colors */
|
||||||
/* TODO: font */
|
/* TODO: font */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue