aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-07-14 10:03:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-14 10:03:35 +0000
commit3f7be59062f00cd99d832eaa5d389b880a3c512e (patch)
tree2849470c94e9fc7a7300a60a7542a5e459bf70d8 /config.c
parentthemes: enable custom cursor colors in all themes that define such colors (diff)
config: add csd.double-click-to-maximize=no|yes option
When enabled, double-clicking the CSD titlebar will (un)maximize the window. Defaults to ‘yes’ (since this is the old hard-coded behavior). Closes #1293
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 5c38aef5..735ccd74 100644
--- a/config.c
+++ b/config.c
@@ -1475,6 +1475,9 @@ parse_section_csd(struct context *ctx)
else if (strcmp(key, "hide-when-maximized") == 0)
return value_to_bool(ctx, &conf->csd.hide_when_maximized);
+ else if (strcmp(key, "double-click-to-maximize") == 0)
+ return value_to_bool(ctx, &conf->csd.double_click_to_maximize);
+
else {
LOG_CONTEXTUAL_ERR("not a valid action: %s", key);
return false;
@@ -3009,6 +3012,7 @@ config_load(struct config *conf, const char *conf_path,
.preferred = CONF_CSD_PREFER_SERVER,
.font = {0},
.hide_when_maximized = false,
+ .double_click_to_maximize = true,
.title_height = 26,
.border_width = 5,
.border_width_visible = 0,