aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-19 15:49:28 +0000
committerGerd Moellmann2000-07-19 15:49:28 +0000
commitf1c16db4be92d2f329851973e5b5af24fbacf027 (patch)
treeea9a7217df721b234a2534bf24e5ab95f5aebaa7
parent9339e87f340f1136919f6e2ec5bb3e94799b80e8 (diff)
downloademacs-f1c16db4be92d2f329851973e5b5af24fbacf027.tar.gz
emacs-f1c16db4be92d2f329851973e5b5af24fbacf027.zip
Don't include <X11/bitmaps/gray> because that
leads to redefinition errors when static is defined as empty in config.h. Refer to the gray bitmap in xfns.c, instead.
-rw-r--r--lwlib/xlwmenu.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 3a1a490710b..a5687d9de50 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -32,10 +32,18 @@ Boston, MA 02111-1307, USA. */
32#include <X11/ObjectP.h> 32#include <X11/ObjectP.h>
33#include <X11/StringDefs.h> 33#include <X11/StringDefs.h>
34#include <X11/cursorfont.h> 34#include <X11/cursorfont.h>
35#include <X11/bitmaps/gray>
36#include "xlwmenuP.h" 35#include "xlwmenuP.h"
37 36
38#ifdef emacs 37#ifdef emacs
38
39/* Defined in xfns.c. When config.h defines `static' as empty, we get
40 redefinition errors when gray_bitmap is included more than once, so
41 we're referring to the one include in xfns.c here. */
42
43extern int gray_bitmap_width;
44extern int gray_bitmap_height;
45extern unsigned char *gray_bitmap_bits;
46
39/* Defined in xterm.c. */ 47/* Defined in xterm.c. */
40extern int x_alloc_nearest_color_for_widget __P ((Widget, Colormap, XColor*)); 48extern int x_alloc_nearest_color_for_widget __P ((Widget, Colormap, XColor*));
41extern int x_catch_errors __P ((Display*)); 49extern int x_catch_errors __P ((Display*));
@@ -48,7 +56,14 @@ extern unsigned long x_copy_dpy_color __P ((Display *, Colormap,
48/* Defined in xfaces.c. */ 56/* Defined in xfaces.c. */
49extern void x_free_dpy_colors __P ((Display *, Screen *, Colormap, 57extern void x_free_dpy_colors __P ((Display *, Screen *, Colormap,
50 unsigned long *pixels, int npixels)); 58 unsigned long *pixels, int npixels));
51#endif 59#else /* not emacs */
60
61#include <X11/bitmaps/gray>
62#define gray_bitmap_width gray_width
63#define gray_bitmap_height gray_height
64#define gray_bitmap_bits gray_bits
65
66#endif /* not emacs */
52 67
53static int pointer_grabbed; 68static int pointer_grabbed;
54static XEvent menu_post_event; 69static XEvent menu_post_event;
@@ -1617,8 +1632,8 @@ XlwMenuInitialize (request, mw, args, num_args)
1617 mw->menu.cursor = mw->menu.cursor_shape; 1632 mw->menu.cursor = mw->menu.cursor_shape;
1618 1633
1619 mw->menu.gray_pixmap 1634 mw->menu.gray_pixmap
1620 = XCreatePixmapFromBitmapData (display, window, gray_bits, 1635 = XCreatePixmapFromBitmapData (display, window, gray_bitmap_bits,
1621 gray_width, gray_height, 1636 gray_bitmap_width, gray_bitmap_height,
1622 (unsigned long)1, (unsigned long)0, 1); 1637 (unsigned long)1, (unsigned long)0, 1);
1623 1638
1624 /* I don't understand why this ends up 0 sometimes, 1639 /* I don't understand why this ends up 0 sometimes,