Gunnar Evermann <ge204(a)eng.cam.ac.uk> writes:
> When using all non-Motif widgets, but linking with Motif for XIM
and/or
> CDE (drag'n'drop) support, configure fails to define NEED_MOTIF. This
> causes lwlib to create GC:s with the stipple pattern set to (Pixmap)2.
> As this is not a valid pixmap value, the GC:s will be unusable and
> millions of X errors appear on standard error.
since nobody reacted I'll take a guess...
Nobody reacted because it is not ..
dnl At this point, we know whether we need the motif lib or not.
if test "$need_motif" = "yes" ; then
XE_PREPEND(-lXm, libs_x)
+ AC_DEFINE(NEED_MOTIF)
... that easy. If you define NEED_MOTIF you switch xlwmenu to use
Motif which is not what you want. I'm not sure how the value of the
resource gets set (by linking with -lXm we are apparently pulling in
some resource setup code) , but I'm fairly sure the better solution
would be (compiles and runs for me, but not tested).
2000-02-12 Jan Vroonhof <vroonhof(a)math.ethz.ch>
* xlwmenu.h (XmUNSPECIFIED_PIXMAP): Define this we are using Motif
compatible resource names.
* xlwmenu.c (make_shadow_gcs): Always check for XmUNSPECIFIED_PIXMAP
even if we are only 'compatible' with the Motif resources.
Index: xlwmenu.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lwlib/xlwmenu.c,v
retrieving revision 1.30
diff -u -u -r1.30 xlwmenu.c
--- xlwmenu.c 1999/06/13 05:16:45 1.30
+++ xlwmenu.c 2000/02/12 22:29:53
@@ -2810,30 +2810,22 @@
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.bottom_shadow_pixmap &&
mw->menu.bottom_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);
Index: xlwmenu.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lwlib/xlwmenu.h,v
retrieving revision 1.4
diff -u -u -r1.4 xlwmenu.h
--- xlwmenu.h 1997/10/31 14:53:35 1.4
+++ xlwmenu.h 2000/02/12 22:29:53
@@ -56,6 +56,7 @@
# define XmCTopShadowPixmap "TopShadowPixmap"
# define XmNbottomShadowPixmap "bottomShadowPixmap"
# define XmCBottomShadowPixmap "BottomShadowPixmap"
+# define XmUNSPECIFIED_PIXMAP 2
# define XmRHorizontalDimension "HorizontalDimension"
# define XmNspacing "spacing"
# define XmCSpacing "Spacing"