XEmacs 21.0-b47/pre4 "Uzbek Black" on Solaris 2.7 (fcs in a few
months) spits out the following err many times doing X ops:
xemacs-21.0: X Error of failed request: BadGC (invalid GC parameter)
Major opcode of failed request: 60 (X_FreeGC)
Resource id in failed request: 0x1140002a
Serial number of failed request: 2176
Current serial number in output stream: 2236
Solaris 2.7 has a new Motif shared lib (libXm.so.4) and I'm told that
this is for the new Motif 2.0. XEmacs 21.0 built (pre Solaris 2.7)
against the old shared lib (libXm.so.3) does not have this problem.
A few months ago we filed a bug internally for this problem against
the Motif/X11 libs and the folks who evaluated it said it was a bug
with XEmacs (to my surprise). They even supplied a suggested fix
for XEmacs 20.4. I've applied it to 20.4 and 21.0 and it does
indeed seem to fix the problem (at least the symptom goes away).
I'll include it below.
Anyways, if somebody who knows this area well could take a look,
pls do so and let me know if I can help.
cheers,
glenn
files modified: lwlib/xlwmenu.c, lwlib/xlwscrollbar.c
*** xlwmenu.c.orig Fri Jun 12 21:28:08 1998
--- xlwmenu.c Fri Jul 10 15:43:33 1998
***************
*** 2803,2815 ****
--- 2803,2833 ----
xgcv.fill_style = FillOpaqueStippled;
xgcv.foreground = mw->menu.top_shadow_color;
xgcv.background = mw->core.background_pixel;
+ /* xgcv.stipple = mw->menu.top_shadow_pixmap; gtb */
+ #ifdef NEED_MOTIF
+ if (mw->menu.top_shadow_pixmap &&
+ mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
+ xgcv.stipple = mw->menu.top_shadow_pixmap;
+ else
+ xgcv.stipple = 0;
+ #else
xgcv.stipple = mw->menu.top_shadow_pixmap;
+ #endif /* NEED_MOTIF */
pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
mw->menu.shadow_top_gc =
XtGetGC((Widget)mw, GCForeground|GCBackground|pm, &xgcv);
xgcv.foreground = mw->menu.bottom_shadow_color;
+ /* xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */
+ #ifdef NEED_MOTIF
+ if (mw->menu.top_shadow_pixmap &&
+ mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
+ xgcv.stipple = mw->menu.bottom_shadow_pixmap;
+ else
+ xgcv.stipple = 0;
+ #else
xgcv.stipple = mw->menu.bottom_shadow_pixmap;
+ #endif /* NEED_MOTIF */
pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
mw->menu.shadow_bottom_gc =
XtGetGC ((Widget)mw, GCForeground|GCBackground|pm, &xgcv);
*** xlwscrollbar.c.orig Tue Mar 31 12:11:14 1998
--- xlwscrollbar.c Fri Jul 10 15:47:08 1998
***************
*** 485,490 ****
--- 485,496 ----
}
/*-------------------------- GC and Pixel allocation --------------------*/
+ #ifdef NEED_MOTIF
+ #ifndef XmUNSPECIFIED_PIXMAP
+ #define XmUNSPECIFIED_PIXMAP 2
+ #endif
+ #endif /* NEED_MOTIF */
+
static GC
get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm)
{
***************
*** 506,513 ****
values.background = bg;
values.fill_style = FillOpaqueStippled;
values.stipple = pm;
mask = GCForeground | GCBackground |
! (pm == None ? 0 : GCStipple | GCFillStyle);
return XtGetGC((Widget) w, mask, &values);
}
--- 512,530 ----
values.background = bg;
values.fill_style = FillOpaqueStippled;
values.stipple = pm;
+ /* mask = GCForeground | GCBackground |
+ (pm == None ? 0 : GCStipple | GCFillStyle); gtb */
+ #ifdef NEED_MOTIF
+ if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP)
+ values.stipple = pm;
+ else
+ values.stipple = None;
+ #else
+ values.stipple = pm;
+ #endif /* NEED_MOTIF */
mask = GCForeground | GCBackground |
! (values.stipple == None ? 0 : GCStipple | GCFillStyle);
!
return XtGetGC((Widget) w, mask, &values);
}
Show replies by date