From a26b73a1a64caadf029473342b7d42a7158b7461 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Wed, 8 Aug 2012 11:39:29 -0600 Subject: [PATCH] dtwm: Define a final fallback for loading default window manager font Patch from Frederic Koehler : Define a final fallback for loading default window manager font; before exiting, forcefully try to load "fixed" font. This is sufficient to allow systems where fontList is set to an empty list to startup dtwm, for now. --- cde/programs/dtwm/WmResource.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cde/programs/dtwm/WmResource.c b/cde/programs/dtwm/WmResource.c index 7c3d49c8..af86d8cf 100644 --- a/cde/programs/dtwm/WmResource.c +++ b/cde/programs/dtwm/WmResource.c @@ -4433,7 +4433,17 @@ MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean make { sprintf((char *)wmGD.tmpBuffer, ((char *)GETMESSAGE(62, 23, "failed to load font: %.100s\0")), (char*) pAData->fontList); Warning((char *)wmGD.tmpBuffer); +#if defined(CSRG_BASED) || defined(linux) + /* HACK to try get _some_ font anyway (fontList seems to end up as an empty list on + * some modern systems; investigate) */ + pAData->font = XLoadQueryFont(wmGD.display, "fixed"); + if (pAData->font == NULL) { + ExitWM(WM_ERROR_EXIT_VALUE); + } +#else ExitWM(WM_ERROR_EXIT_VALUE); +#endif + } #ifndef NO_MULTIBYTE -- 2.25.1