diff options
Diffstat (limited to 'xorg-server/dix/dixfonts.c')
-rw-r--r-- | xorg-server/dix/dixfonts.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c index 496e075d9..1cc5a9161 100644 --- a/xorg-server/dix/dixfonts.c +++ b/xorg-server/dix/dixfonts.c @@ -130,6 +130,7 @@ SetDefaultFont(char *defaultfontname) int err;
FontPtr pf;
XID fid;
+ static FontPtr last_pf;
fid = FakeClientID(0);
err = OpenFont(serverClient, fid, FontLoadAll | FontOpenSync,
@@ -138,9 +139,10 @@ SetDefaultFont(char *defaultfontname) return FALSE;
err = dixLookupResourceByType((pointer *)&pf, fid, RT_FONT, serverClient,
DixReadAccess);
- if (err != Success)
+ if (err == Success) last_pf = pf;
+ if (last_pf == (FontPtr) NULL)
return FALSE;
- defaultFont = pf;
+ defaultFont = last_pf;
return TRUE;
}
@@ -1164,7 +1166,7 @@ badAlloc: #define TextEltHeader 2
#define FontShiftSize 5
-static ChangeGCVal clearGC[] = { { .ptr = NullPixmap } };
+static ChangeGCVal clearGC[] = { NullPixmap };
#define clearGCmask (GCClipMask)
int
|