--- rxvt-unicode/src/xpm.C 2005/02/16 21:37:10 1.23 +++ rxvt-unicode/src/xpm.C 2005/12/31 17:16:17 1.26 @@ -138,10 +138,10 @@ if (flags & YNegative) y += 100; } - MIN_IT (x, 100); - MIN_IT (y, 100); - MAX_IT (x, 0); - MAX_IT (y, 0); + min_it (x, 100); + min_it (y, 100); + max_it (x, 0); + max_it (y, 0); if (bgpixmap->x != x) { bgpixmap->x = x; @@ -166,22 +166,22 @@ unsigned int height = TermWin_TotalHeight (); dDisp; - if (TermWin.pixmap != None) - XFreePixmap (disp, TermWin.pixmap); + if (pixmap != None) + XFreePixmap (disp, pixmap); if (bgPixmap.pixmap == None) { /* So be it: I'm not using pixmaps */ - TermWin.pixmap = None; + pixmap = None; - if (!(options & Opt_transparent) || !am_transparent) - XSetWindowBackground (disp, TermWin.vt, + if (!OPTION (Opt_transparent) || !am_transparent) + XSetWindowBackground (disp, vt, pix_colors[Color_bg]); return; } gcvalue.foreground = pix_colors[Color_bg]; - gc = XCreateGC (disp, TermWin.vt, GCForeground, &gcvalue); + gc = XCreateGC (disp, vt, GCForeground, &gcvalue); if (bgPixmap.pixmap != None) { /* we have a specified pixmap */ @@ -202,10 +202,10 @@ if (w == 0) { /* basic X tiling - let the X server do it */ - TermWin.pixmap = XCreatePixmap (disp, TermWin.vt, + pixmap = XCreatePixmap (disp, vt, xpmw, xpmh, (unsigned int)display->depth); - XCopyArea (disp, bgPixmap.pixmap, TermWin.pixmap, gc, + XCopyArea (disp, bgPixmap.pixmap, pixmap, gc, 0, 0, xpmw, xpmh, 0, 0); } else @@ -213,7 +213,7 @@ float incr, p; Pixmap tmp; - TermWin.pixmap = XCreatePixmap (disp, TermWin.vt, + pixmap = XCreatePixmap (disp, vt, width, height, (unsigned int)display->depth); /* @@ -221,7 +221,7 @@ */ rxvt_pixmap_incr (&w, &x, &incr, &p, width, xpmw); - tmp = XCreatePixmap (disp, TermWin.vt, + tmp = XCreatePixmap (disp, vt, width, xpmh, (unsigned int)display->depth); XFillRectangle (disp, tmp, gc, 0, 0, width, xpmh); @@ -241,10 +241,10 @@ rxvt_pixmap_incr (&h, &y, &incr, &p, height, xpmh); if (y > 0) - XFillRectangle (disp, TermWin.pixmap, gc, 0, 0, width, y); + XFillRectangle (disp, pixmap, gc, 0, 0, width, y); if (h < height) - XFillRectangle (disp, TermWin.pixmap, gc, 0, (int)h, width, height - h + 1); + XFillRectangle (disp, pixmap, gc, 0, (int)h, width, height - h + 1); for ( /*nil */ ; y < h; y++, p += incr) { @@ -252,7 +252,7 @@ p = 0; /* copy one row from the tmp pixmap to the main pixmap */ - XCopyArea (disp, tmp, TermWin.pixmap, gc, + XCopyArea (disp, tmp, pixmap, gc, 0, (int)p, width, 1, 0, (int)y); } @@ -260,7 +260,7 @@ } } - XSetWindowBackgroundPixmap (disp, TermWin.vt, TermWin.pixmap); + XSetWindowBackgroundPixmap (disp, vt, pixmap); XFreeGC (disp, gc); am_transparent = 0; } @@ -354,7 +354,7 @@ bgPixmap.pixmap = None; } - XSetWindowBackground (display->display, TermWin.vt, pix_colors[Color_bg]); + XSetWindowBackground (display->display, vt, pix_colors[Color_bg]); if (*file != '\0') { @@ -363,7 +363,7 @@ /* * we already have the required attributes */ - /* XGetWindowAttributes (display->display, TermWin.vt, &attr); */ + /* XGetWindowAttributes (display->display, vt, &attr); */ xpmAttr.closeness = 30000; xpmAttr.colormap = display->cmap;