1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtwm: Define a final fallback for loading default window manager font

Patch from Frederic Koehler <f.koehler427@gmail.com>:

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.
This commit is contained in:
Jon Trulson 2012-08-08 11:39:29 -06:00
parent b49872206b
commit a26b73a1a6

View file

@ -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