--- rxvt-unicode/src/xpm.C 2004/02/13 12:16:21 1.9 +++ rxvt-unicode/src/xpm.C 2004/08/02 04:20:48 1.14 @@ -1,7 +1,6 @@ /*--------------------------------*-C-*---------------------------------* - * File: xpm.c + * File: xpm.C *----------------------------------------------------------------------* - * $Id: xpm.C,v 1.9 2004/02/13 12:16:21 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1997 Carsten Haitzler @@ -69,7 +68,7 @@ sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */ min (bgpixmap->w, 9999), min (bgpixmap->h, 9999), min (bgpixmap->x, 9999), min (bgpixmap->y, 9999)); - xterm_seq (XTerm_title, str, CHAR_ST); + process_xterm_seq (XTerm_title, str, CHAR_ST); free (str); return 0; } @@ -201,7 +200,7 @@ /* basic X tiling - let the X server do it */ TermWin.pixmap = XCreatePixmap (display->display, TermWin.vt, xpmw, xpmh, - (unsigned int)XDEPTH); + (unsigned int)display->depth); XCopyArea (display->display, bgPixmap.pixmap, TermWin.pixmap, gc, 0, 0, xpmw, xpmh, 0, 0); } @@ -212,14 +211,14 @@ TermWin.pixmap = XCreatePixmap (display->display, TermWin.vt, width, height, - (unsigned int)XDEPTH); + (unsigned int)display->depth); /* * horizontal scaling */ rxvt_pixmap_incr (&w, &x, &incr, &p, width, xpmw); tmp = XCreatePixmap (display->display, TermWin.vt, - width, xpmh, (unsigned int)XDEPTH); + width, xpmh, (unsigned int)display->depth); XFillRectangle (display->display, tmp, gc, 0, 0, width, xpmh); @@ -254,6 +253,7 @@ XFreePixmap (display->display, tmp); } } + XSetWindowBackgroundPixmap (display->display, TermWin.vt, TermWin.pixmap); XFreeGC (display->display, gc); am_transparent = 0; @@ -364,9 +364,9 @@ /* XGetWindowAttributes (display->display, TermWin.vt, &attr); */ xpmAttr.closeness = 30000; - xpmAttr.colormap = XCMAP; - xpmAttr.visual = XVISUAL; - xpmAttr.depth = XDEPTH; + xpmAttr.colormap = display->cmap; + xpmAttr.visual = display->visual; + xpmAttr.depth = display->depth; xpmAttr.valuemask = (XpmCloseness | XpmColormap | XpmVisual | XpmDepth | XpmSize | XpmReturnPixels); @@ -377,17 +377,18 @@ &bgPixmap.pixmap, NULL, &xpmAttr)) { - char *p; + char *p; /* semi-colon delimited */ if ((p = STRCHR (file, ';')) == NULL) p = STRCHR (file, '\0'); - rxvt_print_error ("couldn't load XPM file \"%.*s\"", (p - file), - file); + rxvt_warn ("couldn't load XPM file \"%.*s\", ignoring.", (p - file), file); } + free (f); } + resize_pixmap (); return bgPixmap.pixmap; }