changeset 53933:869ca316cdda

(x_draw_fringe_bitmap): Handle wider bitmaps (max 16 bits).
author Kim F. Storm <storm@cua.dk>
date Fri, 13 Feb 2004 23:27:38 +0000
parents cf4f19cf90c4
children de8ab2bcee32
files src/xterm.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Fri Feb 13 23:10:59 2004 +0000
+++ b/src/xterm.c	Fri Feb 13 23:27:38 2004 +0000
@@ -735,11 +735,16 @@
 
   if (p->which)
     {
-      unsigned char *bits = p->bits + p->dh;
+      unsigned char *bits;
       Pixmap pixmap, clipmask = (Pixmap) 0;
       int depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f));
       XGCValues gcv;
 
+      if (p->wd > 8)
+	bits = (unsigned char *)(p->bits + p->dh);
+      else
+	bits = (unsigned char *)p->bits + p->dh;
+
       /* Draw the bitmap.  I believe these small pixmaps can be cached
 	 by the server.  */
       pixmap = XCreatePixmapFromBitmapData (display, window, bits, p->wd, p->h,