summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-31 16:21:55 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-03-31 17:10:15 -0400
commit0fe318e40ab567e236fc8ba5d16cdc4b590ff3f5 (patch)
treea3d3fac40a3ecc88505b504f881203da6b676a34 /pango/pangofc-fontmap.c
parent80dbd6ea6f37793109b0ab5bfd43bac811810481 (diff)
downloadpango-0fe318e40ab567e236fc8ba5d16cdc4b590ff3f5.tar.gz
Fix hangs that people have observedfix-deadlocks2
We were erroneously setting fc_initialized back to 1 in one place. But now 1 means 'wait for the FcInit thread that is already underway. Setting it to 2 restores the intention.
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 813b6c78..7966a8cd 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1372,7 +1372,6 @@ start_init_in_thread (PangoFcFontMap *fcfontmap)
GTask *task;
fc_initialized = 1;
-
task = g_task_new (fcfontmap, NULL, NULL, NULL);
g_task_set_name (task, "[pango] FcInit");
g_task_run_in_thread (task, init_in_thread);
@@ -2333,7 +2332,7 @@ pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
FcConfigDestroy (oldconfig);
/* No need to wait anymore */
- fc_initialized = TRUE;
+ fc_initialized = 2;
}
/**