mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Reuse parsed PangoFontDescription
Avoids parsing the configured font each time text is rendered.
This commit is contained in:
parent
75605491a5
commit
80e386fd97
11 changed files with 52 additions and 49 deletions
|
|
@ -26,7 +26,7 @@ struct swaybar_config *init_config(void) {
|
|||
config->status_command = NULL;
|
||||
config->pango_markup = false;
|
||||
config->position = parse_position("bottom");
|
||||
config->font = strdup("monospace 10");
|
||||
config->font_description = pango_font_description_from_string("monospace 10");
|
||||
config->mode = strdup("dock");
|
||||
config->hidden_state = strdup("hide");
|
||||
config->sep_symbol = NULL;
|
||||
|
|
@ -105,7 +105,7 @@ void free_tray_binding(struct tray_binding *binding) {
|
|||
|
||||
void free_config(struct swaybar_config *config) {
|
||||
free(config->status_command);
|
||||
free(config->font);
|
||||
pango_font_description_free(config->font_description);
|
||||
free(config->mode);
|
||||
free(config->hidden_state);
|
||||
free(config->sep_symbol);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue