From 11e8aa1f55f3574063198d453bd653228837ecb5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 28 Feb 2007 04:49:32 +0000 Subject: [PATCH] fix another problem when traditional X11 fonts are unavailable svn: r5708 --- src/wxxt/src/XWidgets/xwGroup.c | 7 +++++-- src/wxxt/src/XWidgets/xwGroup.w | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/wxxt/src/XWidgets/xwGroup.c b/src/wxxt/src/XWidgets/xwGroup.c index 9da104e16a..98cd61bbc5 100644 --- a/src/wxxt/src/XWidgets/xwGroup.c +++ b/src/wxxt/src/XWidgets/xwGroup.c @@ -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, diff --git a/src/wxxt/src/XWidgets/xwGroup.w b/src/wxxt/src/XWidgets/xwGroup.w index 14ad0b2f8a..39386b7123 100644 --- a/src/wxxt/src/XWidgets/xwGroup.w +++ b/src/wxxt/src/XWidgets/xwGroup.w @@ -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); }