diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-03 15:02:16 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-03 15:12:00 +1000 |
commit | 55b307cddfa453fc003350a642a68735bc36e50e (patch) | |
tree | 4cc54f1be82db862fa4896b5da1d52868a273161 /sway/commands/font.c | |
parent | Render titles (diff) | |
download | sway-55b307cddfa453fc003350a642a68735bc36e50e.tar.gz sway-55b307cddfa453fc003350a642a68735bc36e50e.tar.zst sway-55b307cddfa453fc003350a642a68735bc36e50e.zip |
Calculate config->font_height based on existing container titles
Diffstat (limited to 'sway/commands/font.c')
-rw-r--r-- | sway/commands/font.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 @@ | |||
2 | #include <string.h> | 2 | #include <string.h> |
3 | #include "sway/commands.h" | 3 | #include "sway/commands.h" |
4 | #include "sway/config.h" | 4 | #include "sway/config.h" |
5 | #include "sway/tree/arrange.h" | ||
5 | #include "log.h" | 6 | #include "log.h" |
6 | #include "stringop.h" | 7 | #include "stringop.h" |
7 | 8 | ||
@@ -13,6 +14,9 @@ struct cmd_results *cmd_font(int argc, char **argv) { | |||
13 | char *font = join_args(argv, argc); | 14 | char *font = join_args(argv, argc); |
14 | free(config->font); | 15 | free(config->font); |
15 | config->font = strdup(font); | 16 | config->font = strdup(font); |
16 | config->font_height = get_font_text_height(font); | 17 | config_find_font_height(true); |
18 | if (!config->reading) { | ||
19 | arrange_root(); | ||
20 | } | ||
17 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 21 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
18 | } | 22 | } |