1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-10 10:35:46 +01:00

Fixed bug with incorrect un-escaping if there is a dot in wm_class.

This commit is contained in:
dan
2003-09-03 19:09:20 +00:00
parent 6aed0cd713
commit 847479b886
3 changed files with 27 additions and 41 deletions

View File

@@ -196,7 +196,8 @@ WMCreateFont(WMScreen *scrPtr, char *fontName)
/* This is for back-compat (to allow reading of old xlfd descriptions) */
if (fontName[0]=='-' && (ptr = strchr(fontName, ','))) {
fname = wmalloc(ptr - fontName + 1);
// warn for deprecation
fname = wmalloc(ptr - fontName + 1);
strncpy(fname, fontName, ptr - fontName);
fname[ptr - fontName] = 0;
} else {
@@ -215,9 +216,11 @@ WMCreateFont(WMScreen *scrPtr, char *fontName)
font->screen = scrPtr;
// remove
printf("%s\n", fname);
if (fname[0] == '-') {
/* Backward compat thing. Remove in a later version */
// Backward compat thing. Remove in a later version
font->font = XftFontOpenXlfd(display, scrPtr->screen, fname);
} else {
font->font = XftFontOpenName(display, scrPtr->screen, fname);