#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
-static char * gnu_bits[] = {
+static char * gnu_xpm_bits[] = {
"32 32 173 2",
" c None",
". c #67627D",
" P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P. ",
" ",
" "};
-#else
-#define gnu_width 50
-#define gnu_height 50
-static unsigned char gnu_bits[] = {
+#endif /* defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) */
+
+#define gnu_xbm_width 50
+#define gnu_xbm_height 50
+static unsigned char gnu_xbm_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00,
0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00};
-#endif
/* arch-tag: b57020c7-c937-4d77-8ca6-3875178d9828
(do not change this comment) */
/* Create the GNU bitmap and mask if necessary. */
if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0)
{
+ int rc = -1;
+
#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
- FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id
- = x_create_bitmap_from_xpm_data (f, gnu_bits);
+#ifdef USE_GTK
+ if (xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
+ return 0;
#else
- FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id
- = x_create_bitmap_from_data (f, gnu_bits,
- gnu_width, gnu_height);
-#endif /* (HAVE_XPM) && defined (HAVE_X_WINDOWS) */
- x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
+ rc = x_create_bitmap_from_xpm_data (f, gnu_xpm_bits);
+ if (rc != -1)
+ FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc;
+#endif /* USE_GTK */
+#endif /* defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) */
+
+ /* If all else fails, use the (black and white) xbm image. */
+ if (rc == -1)
+ {
+ rc = x_create_bitmap_from_data (f, gnu_xbm_bits,
+ gnu_xbm_width, gnu_xbm_height);
+ if (rc == -1)
+ return 1;
+
+ FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc;
+ x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
+ }
}
/* The first time we create the GNU bitmap and mask,