aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-20 18:27:16 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-20 18:27:16 +0000
commit4f4ee5b39dd4e9a7cbc71c73ac0f54e72a2169b2 (patch)
tree57be6448f1dd04ea1c4197551103c30ff4ccd1a0 /main.c
parentREADME: here -> hear (doh!) (diff)
main: mention why we initialize a font set
Since fonts are destroyed and removed from the font cache when the last instance is destroyed, closing the "last" terminal window in server mode would destroy the fonts, and their glyph caches. By instantiating the set in main, we ensure the fonts, and the glyph caches, remain. This makes launching new terminals (much) faster. Note that in "normal" (non-server) mode, this isn't really necessary, but also doesn't have any penalty.
Diffstat (limited to 'main.c')
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index 65b01937..4a392533 100644
--- a/main.c
+++ b/main.c
@@ -190,6 +190,7 @@ main(int argc, char *const *argv)
struct server *server = NULL;
struct shutdown_context shutdown_ctx = {.term = &term, .exit_code = EXIT_FAILURE};
+ /* This ensures we keep a set of fonts in the cache */
if (!initialize_fonts(&conf, fonts))
goto out;