From 3f7be59062f00cd99d832eaa5d389b880a3c512e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 14 Jul 2023 12:03:35 +0200 Subject: config: add csd.double-click-to-maximize=no|yes option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.c') 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, -- cgit v1.3