Mercurial > emacs
comparison lwlib/xlwmenu.c @ 30324:d4713daa6716
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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 19 Jul 2000 15:49:28 +0000 |
parents | 1e88ad071a1a |
children | c37c79e6a6e7 |
comparison
equal
deleted
inserted
replaced
30323:4cd1b8fe118c | 30324:d4713daa6716 |
---|---|
30 #include <X11/Xos.h> | 30 #include <X11/Xos.h> |
31 #include <X11/IntrinsicP.h> | 31 #include <X11/IntrinsicP.h> |
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 | |
43 extern int gray_bitmap_width; | |
44 extern int gray_bitmap_height; | |
45 extern unsigned char *gray_bitmap_bits; | |
46 | |
39 /* Defined in xterm.c. */ | 47 /* Defined in xterm.c. */ |
40 extern int x_alloc_nearest_color_for_widget __P ((Widget, Colormap, XColor*)); | 48 extern int x_alloc_nearest_color_for_widget __P ((Widget, Colormap, XColor*)); |
41 extern int x_catch_errors __P ((Display*)); | 49 extern int x_catch_errors __P ((Display*)); |
42 extern int x_uncatch_errors __P ((Display*, int)); | 50 extern int x_uncatch_errors __P ((Display*, int)); |
43 extern int x_had_errors_p __P ((Display*)); | 51 extern int x_had_errors_p __P ((Display*)); |
46 unsigned long)); | 54 unsigned long)); |
47 | 55 |
48 /* Defined in xfaces.c. */ | 56 /* Defined in xfaces.c. */ |
49 extern void x_free_dpy_colors __P ((Display *, Screen *, Colormap, | 57 extern 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 |
53 static int pointer_grabbed; | 68 static int pointer_grabbed; |
54 static XEvent menu_post_event; | 69 static XEvent menu_post_event; |
55 | 70 |
56 XFontStruct *xlwmenu_default_font; | 71 XFontStruct *xlwmenu_default_font; |
1615 | 1630 |
1616 /* mw->menu.cursor = XCreateFontCursor (display, mw->menu.cursor_shape); */ | 1631 /* mw->menu.cursor = XCreateFontCursor (display, mw->menu.cursor_shape); */ |
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, |
1625 but it does. This kludge works around it. | 1640 but it does. This kludge works around it. |
1626 Can anyone find a real fix? -- rms. */ | 1641 Can anyone find a real fix? -- rms. */ |