diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-30 16:38:04 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-30 16:38:04 +0200 |
commit | 63474aa04d267391575249321820b1dd1ae4f980 (patch) | |
tree | 9a049e6ac802b30247fddf6606902106a3821126 /sway | |
parent | 655b003062cd5cf81d6de2f2c486d9b81177bb79 (diff) | |
download | sway-63474aa04d267391575249321820b1dd1ae4f980.tar.xz |
Make pango: optional for bar font
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c index c621fa92..381c0133 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -2263,14 +2263,14 @@ static struct cmd_results *bar_cmd_font(int argc, char **argv) { } char *font = join_args(argv, argc); + free(config->current_bar->font); if (strlen(font) > 6 && strncmp("pango:", font, 6) == 0) { - free(config->current_bar->font); config->current_bar->font = font; - sway_log(L_DEBUG, "Settings font '%s' for bar: %s", config->current_bar->font, config->current_bar->id); } else { - sway_log(L_ERROR, "warning: non-pango font '%s' not supported.", font); + config->current_bar->font = font; } + sway_log(L_DEBUG, "Settings font '%s' for bar: %s", config->current_bar->font, config->current_bar->id); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } |