fix another problem when traditional X11 fonts are unavailable

svn: r5708
This commit is contained in:
Matthew Flatt 2007-02-28 04:49:32 +00:00
parent 2580d71781
commit 11e8aa1f55
2 changed files with 9 additions and 3 deletions

View File

@ -103,8 +103,11 @@ static void make_textgc(self)Widget self;
if (((XfwfGroupWidget)self)->xfwfGroup.textgc != NULL) XtReleaseGC(self, ((XfwfGroupWidget)self)->xfwfGroup.textgc);
values.background = ((XfwfGroupWidget)self)->core.background_pixel;
values.foreground = ((XfwfGroupWidget)self)->xfwfGroup.foreground;
values.font = ((XfwfGroupWidget)self)->xfwfGroup.font->fid;
mask = GCFont | GCBackground | GCForeground;
if (((XfwfGroupWidget)self)->xfwfGroup.font) {
values.font = ((XfwfGroupWidget)self)->xfwfGroup.font->fid;
mask |= GCFont;
}
((XfwfGroupWidget)self)->xfwfGroup.textgc = XtGetGC(self, mask, &values);
}
/*ARGSUSED*/
@ -275,7 +278,7 @@ XfwfGroupClassRec xfwfGroupClassRec = {
/* num_resources */ 8,
/* xrm_class */ NULLQUARK,
/* compres_motion */ True ,
/* compress_exposure */ XtExposeCompressMultiple ,
/* compress_exposure */ XtExposeCompressMaximal ,
/* compress_enterleave */ True ,
/* visible_interest */ False ,
/* destroy */ destroy,

View File

@ -274,8 +274,11 @@ current value of the Group's |selection| resource.
if ($textgc != NULL) XtReleaseGC($, $textgc);
values.background = $background_pixel;
values.foreground = $foreground;
values.font = $font->fid;
mask = GCFont | GCBackground | GCForeground;
if ($font) {
values.font = $font->fid;
mask |= GCFont;
}
$textgc = XtGetGC($, mask, &values);
}