diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-27 20:16:42 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-27 20:16:42 +0000 |
| commit | 598ac4bcd0690995fbf94c7a2b17564dbf69a5f1 (patch) | |
| tree | 0d98b2eab053838eca647a1bd4b680dc20f90156 /config.c | |
| parent | conf: max-shm-pool-size-mb=0 now disables SHM scrolling (diff) | |
| parent | client: add --maximized and --fullscreen (diff) | |
Merge branch 'master' into scroll-damage-performance
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -226,7 +226,7 @@ parse_section_main(const char *key, const char *value, struct config *conf, unsigned x, y; if (sscanf(value, "%ux%u", &x, &y) != 2) { LOG_ERR( - "%s: %d: expected PAD_XxPAD_Y, where both are positive integers: %s", + "%s:%d: expected PAD_XxPAD_Y, where both are positive integers: %s", path, lineno, value); return false; } @@ -235,6 +235,21 @@ parse_section_main(const char *key, const char *value, struct config *conf, conf->pad_y = y; } + else if (strcmp(key, "startup-mode") == 0) { + if (strcmp(value, "windowed") == 0) + conf->startup_mode = STARTUP_WINDOWED; + else if (strcmp(value, "maximized") == 0) + conf->startup_mode = STARTUP_MAXIMIZED; + else if (strcmp(value, "fullscreen") == 0) + conf->startup_mode = STARTUP_FULLSCREEN; + else { + LOG_ERR( + "%s:%d: expected either 'windowed', 'maximized' or 'fullscreen'", + path, lineno); + return false; + } + } + else if (strcmp(key, "font") == 0) { char *copy = strdup(value); for (const char *font = strtok(copy, ","); font != NULL; font = strtok(NULL, ",")) { @@ -816,6 +831,7 @@ config_load(struct config *conf, const char *conf_path) .height = 500, .pad_x = 2, .pad_y = 2, + .startup_mode = STARTUP_WINDOWED, .fonts = tll_init(), .scrollback_lines = 1000, |
