From 91ea0965dd4dfeba0a914c47ad4a64768e983b1b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 11 Nov 2015 22:02:04 -0800 Subject: [PATCH] dix: Move InitFonts up above screen initialization Font initialization was split into two stages, the first was to set up font privates with a call to ResetFontPrivateIndex, then much later the call to InitFonts to set up all of the FPEs. Doing the full font initialization before initializing the video drivers means that we can move the call to ResetFontPrivateIndex inside InitFonts. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard --- dix/dixfonts.c | 2 ++ dix/main.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 300bf043a5..19db141f1e 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1809,6 +1809,8 @@ InitFonts(void) { patternCache = MakeFontPatternCache(); + ResetFontPrivateIndex(); + register_fpe_functions(); } diff --git a/dix/main.c b/dix/main.c index 5495676603..661ab0361d 100644 --- a/dix/main.c +++ b/dix/main.c @@ -199,7 +199,7 @@ dix_main(int argc, char *argv[], char *envp[]) InitEvents(); InitGlyphCaching(); dixResetRegistry(); - ResetFontPrivateIndex(); + InitFonts(); InitCallbackManager(); InitOutput(&screenInfo, argc, argv); @@ -232,7 +232,6 @@ dix_main(int argc, char *argv[], char *envp[]) FatalError("failed to create root window"); } - InitFonts(); if (SetDefaultFontPath(defaultFontPath) != Success) { ErrorF("[dix] failed to set default font path '%s'", defaultFontPath);