From 55b307cddfa453fc003350a642a68735bc36e50e Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 3 May 2018 15:02:16 +1000 Subject: Calculate config->font_height based on existing container titles --- sway/commands/font.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sway/commands') diff --git a/sway/commands/font.c b/sway/commands/font.c index 96127055..38ad8880 100644 --- a/sway/commands/font.c +++ b/sway/commands/font.c @@ -2,6 +2,7 @@ #include #include "sway/commands.h" #include "sway/config.h" +#include "sway/tree/arrange.h" #include "log.h" #include "stringop.h" @@ -13,6 +14,9 @@ struct cmd_results *cmd_font(int argc, char **argv) { char *font = join_args(argv, argc); free(config->font); config->font = strdup(font); - config->font_height = get_font_text_height(font); + config_find_font_height(true); + if (!config->reading) { + arrange_root(); + } return cmd_results_new(CMD_SUCCESS, NULL, NULL); } -- cgit v1.2.3