From b260d5beb9fab0c39f18be677e70b35e988d3c1d Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 24 Nov 2024 12:57:05 +0100 Subject: Scale surfaces properly --- src/config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c index ce34e55..13addef 100644 --- a/src/config.c +++ b/src/config.c @@ -27,6 +27,7 @@ static const config_entry_t bar_entries[] = { { "monitor", CONFIG_STRING, NULL, offsetof(config_t, monitor) }, { "override-redirect", CONFIG_BOOL, NULL, offsetof(config_t, override_redirect) }, { "background", CONFIG_GRADIENT, NULL, offsetof(config_t, background) }, + { "scale", CONFIG_DOUBLE, NULL, offsetof(config_t, scale) }, { 0 }, }; @@ -594,7 +595,10 @@ int config_validate(config_t *config) int errors = 0; // Validate the config itself - // ... + if (config->scale < 1 && config->scale != 0) { + log_error("Bar '%s' should be at least 1", "scale"); + errors++; + } // Validate blocks for (size_t i = 0; i < config->n_blocks; i++) { -- cgit v1.2.3