ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/xpm.C
(Generate patch)

Comparing rxvt-unicode/src/xpm.C (file contents):
Revision 1.12 by pcg, Thu Apr 8 20:31:45 2004 UTC vs.
Revision 1.14 by root, Mon Aug 2 04:20:48 2004 UTC

198 if (w == 0) 198 if (w == 0)
199 { 199 {
200 /* basic X tiling - let the X server do it */ 200 /* basic X tiling - let the X server do it */
201 TermWin.pixmap = XCreatePixmap (display->display, TermWin.vt, 201 TermWin.pixmap = XCreatePixmap (display->display, TermWin.vt,
202 xpmw, xpmh, 202 xpmw, xpmh,
203 (unsigned int)XDEPTH); 203 (unsigned int)display->depth);
204 XCopyArea (display->display, bgPixmap.pixmap, TermWin.pixmap, gc, 204 XCopyArea (display->display, bgPixmap.pixmap, TermWin.pixmap, gc,
205 0, 0, xpmw, xpmh, 0, 0); 205 0, 0, xpmw, xpmh, 0, 0);
206 } 206 }
207 else 207 else
208 { 208 {
209 float incr, p; 209 float incr, p;
210 Pixmap tmp; 210 Pixmap tmp;
211 211
212 TermWin.pixmap = XCreatePixmap (display->display, TermWin.vt, 212 TermWin.pixmap = XCreatePixmap (display->display, TermWin.vt,
213 width, height, 213 width, height,
214 (unsigned int)XDEPTH); 214 (unsigned int)display->depth);
215 /* 215 /*
216 * horizontal scaling 216 * horizontal scaling
217 */ 217 */
218 rxvt_pixmap_incr (&w, &x, &incr, &p, width, xpmw); 218 rxvt_pixmap_incr (&w, &x, &incr, &p, width, xpmw);
219 219
220 tmp = XCreatePixmap (display->display, TermWin.vt, 220 tmp = XCreatePixmap (display->display, TermWin.vt,
221 width, xpmh, (unsigned int)XDEPTH); 221 width, xpmh, (unsigned int)display->depth);
222 XFillRectangle (display->display, tmp, gc, 0, 0, width, 222 XFillRectangle (display->display, tmp, gc, 0, 0, width,
223 xpmh); 223 xpmh);
224 224
225 for ( /*nil */ ; x < w; x++, p += incr) 225 for ( /*nil */ ; x < w; x++, p += incr)
226 { 226 {
251 0, (int)p, width, 1, 0, (int)y); 251 0, (int)p, width, 1, 0, (int)y);
252 } 252 }
253 XFreePixmap (display->display, tmp); 253 XFreePixmap (display->display, tmp);
254 } 254 }
255 } 255 }
256
256 XSetWindowBackgroundPixmap (display->display, TermWin.vt, TermWin.pixmap); 257 XSetWindowBackgroundPixmap (display->display, TermWin.vt, TermWin.pixmap);
257 XFreeGC (display->display, gc); 258 XFreeGC (display->display, gc);
258 am_transparent = 0; 259 am_transparent = 0;
259 260
260 XClearWindow (display->display, TermWin.vt); 261 XClearWindow (display->display, TermWin.vt);
361 * we already have the required attributes 362 * we already have the required attributes
362 */ 363 */
363 /* XGetWindowAttributes (display->display, TermWin.vt, &attr); */ 364 /* XGetWindowAttributes (display->display, TermWin.vt, &attr); */
364 365
365 xpmAttr.closeness = 30000; 366 xpmAttr.closeness = 30000;
366 xpmAttr.colormap = XCMAP; 367 xpmAttr.colormap = display->cmap;
367 xpmAttr.visual = XVISUAL; 368 xpmAttr.visual = display->visual;
368 xpmAttr.depth = XDEPTH; 369 xpmAttr.depth = display->depth;
369 xpmAttr.valuemask = (XpmCloseness | XpmColormap | XpmVisual | 370 xpmAttr.valuemask = (XpmCloseness | XpmColormap | XpmVisual |
370 XpmDepth | XpmSize | XpmReturnPixels); 371 XpmDepth | XpmSize | XpmReturnPixels);
371 372
372 /* search environment variables here too */ 373 /* search environment variables here too */
373 f = (char *)rxvt_File_find (file, ".xpm", rs[Rs_path]); 374 f = (char *)rxvt_File_find (file, ".xpm", rs[Rs_path]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines