diff options
author | Hugo Osvaldo Barrera <hugo@barrera.io> | 2022-07-01 12:23:04 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-07-01 13:05:58 +0200 |
commit | 80e386fd97c0da00970f0acc007574151048cfbf (patch) | |
tree | df11d53184b20e3f1afe86b8272420349fd9b552 /include/swaybar/config.h | |
parent | Reject font values that are invalid for pango (diff) | |
download | sway-80e386fd97c0da00970f0acc007574151048cfbf.tar.gz sway-80e386fd97c0da00970f0acc007574151048cfbf.tar.zst sway-80e386fd97c0da00970f0acc007574151048cfbf.zip |
Reuse parsed PangoFontDescription
Avoids parsing the configured font each time text is rendered.
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r-- | include/swaybar/config.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/swaybar/config.h b/include/swaybar/config.h index 4cacd21a..361acd99 100644 --- a/include/swaybar/config.h +++ b/include/swaybar/config.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include "../include/config.h" | 6 | #include "../include/config.h" |
7 | #include "list.h" | 7 | #include "list.h" |
8 | #include "util.h" | 8 | #include "util.h" |
9 | #include <pango/pangocairo.h> | ||
9 | 10 | ||
10 | struct box_colors { | 11 | struct box_colors { |
11 | uint32_t border; | 12 | uint32_t border; |
@@ -28,7 +29,7 @@ struct swaybar_config { | |||
28 | char *status_command; | 29 | char *status_command; |
29 | bool pango_markup; | 30 | bool pango_markup; |
30 | uint32_t position; // zwlr_layer_surface_v1_anchor | 31 | uint32_t position; // zwlr_layer_surface_v1_anchor |
31 | char *font; | 32 | PangoFontDescription *font_description; |
32 | char *sep_symbol; | 33 | char *sep_symbol; |
33 | char *mode; | 34 | char *mode; |
34 | char *hidden_state; | 35 | char *hidden_state; |