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
This commit is contained in:
Daniel Eklöf 2023-07-14 12:03:35 +02:00
parent 3cd0e2adb0
commit 3f7be59062
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
7 changed files with 19 additions and 1 deletions

View file

@ -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,