]> git.eshelyaron.com Git - emacs.git/commitdiff
initialize XpmAttributes
authorChong Yidong <cyd@stupidchicken.com>
Wed, 16 Nov 2005 13:38:25 +0000 (13:38 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 16 Nov 2005 13:38:25 +0000 (13:38 +0000)
src/ChangeLog
src/image.c

index 872627211775b0f998b5128692a91b1155aadc59..d366093114b23258adcdce03424c4c5c4e802174 100644 (file)
@@ -5,6 +5,7 @@
        * xterm.c (x_bitmap_icon): Use the xpm if available.
 
        * image.c (x_create_bitmap_from_xpm_data): New function.
+       (x_create_bitmap_from_xpm_data): Initialize XpmAttributes.
 
 2005-11-15  Luc Teirlinck  <teirllm@auburn.edu>
 
index aec66eb3cb8d236f24cefba8e5909ea3910f213b..1ba1cd197ff71cef6c4fbdadfae0e51748b0e1c9 100644 (file)
@@ -3729,6 +3729,11 @@ x_create_bitmap_from_xpm_data (f, bits)
 
   bzero (&attrs, sizeof attrs);
 
+  attrs.visual = FRAME_X_VISUAL (f);
+  attrs.colormap = FRAME_X_COLORMAP (f);
+  attrs.valuemask |= XpmVisual;
+  attrs.valuemask |= XpmColormap;
+
   rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                                bits, &bitmap, &mask, &attrs);
   if (rc != XpmSuccess)
@@ -3797,6 +3802,9 @@ xpm_load (f, img)
   attrs.valuemask |= XpmCloseness;
 #endif /* not XpmAllocCloseColors */
 #endif /* ALLOC_XPM_COLORS */
+#ifdef ALLOC_XPM_COLORS
+  xpm_init_color_cache (f, &attrs);
+#endif
 
   /* If image specification contains symbolic color definitions, add
      these to `attrs'.  */