aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-04-30 09:39:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-04-30 09:39:41 +0000
commitae5af7bb06263dff7a436975424087bb4ee12ea4 (patch)
tree33a952e10ec19bc2bc754efe5a57a46122dea67e
parentmain: only set LC_CTYPE (diff)
term: start slave before loading fonts and starting rendering threads
This allows the client to load in parallel with our font loading, which should improve startup time.
-rw-r--r--terminal.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/terminal.c b/terminal.c
index cca328d9..02d175c6 100644
--- a/terminal.c
+++ b/terminal.c
@@ -850,6 +850,14 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
.cwd = strdup(cwd),
};
+ /* Start the slave/client */
+ if ((term->slave = slave_spawn(
+ term->ptmx, argc, term->cwd, argv,
+ conf->term, conf->shell, conf->login_shell)) == -1)
+ {
+ goto err;
+ }
+
/* Guess scale; we're not mapped yet, so we don't know on which
* output we'll be. Pick highest scale we find for now */
tll_foreach(term->wl->monitors, it) {
@@ -858,6 +866,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
}
initialize_color_cube(term);
+
/* Initialize the Wayland window backend */
if ((term->window = wayl_win_init(term)) == NULL)
goto err;
@@ -886,14 +895,6 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
break;
}
- /* Start the slave/client */
- if ((term->slave = slave_spawn(
- term->ptmx, argc, term->cwd, argv,
- conf->term, conf->shell, conf->login_shell)) == -1)
- {
- goto err;
- }
-
if (!initialize_render_workers(term))
goto err;