aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-04-15 18:12:34 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-16 09:45:50 +0000
commitfbcebd4f1c32f30bfedbad6a108acf6900ea955f (patch)
treec56b8d7827f088bfd62f5b0851a76b305a509254 /config.c
parentrender: take (visible) CSD border size into account when setting initial size (diff)
config: add [csd].hide-when-maximized=yes|no
When enabled, the CSD titlebar will be hidden when the window is maximized. Closes #1019
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index 1f125549..fee47c03 100644
--- a/config.c
+++ b/config.c
@@ -1361,6 +1361,9 @@ parse_section_csd(struct context *ctx)
else if (strcmp(key, "border-width") == 0)
return value_to_uint16(ctx, 10, &conf->csd.border_width_visible);
+ else if (strcmp(key, "hide-when-maximized") == 0)
+ return value_to_bool(ctx, &conf->csd.hide_when_maximized);
+
else {
LOG_CONTEXTUAL_ERR("not a valid action: %s", key);
return false;
@@ -2835,6 +2838,7 @@ config_load(struct config *conf, const char *conf_path,
.csd = {
.preferred = CONF_CSD_PREFER_SERVER,
.font = {0},
+ .hide_when_maximized = false,
.title_height = 26,
.border_width = 5,
.border_width_visible = 0,