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

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.134 by sf-exg, Tue Jan 11 11:04:39 2011 UTC vs.
Revision 1.135 by sf-exg, Tue Jan 11 11:12:45 2011 UTC

1325 } 1325 }
1326 1326
1327 if (root_pixmap == None) 1327 if (root_pixmap == None)
1328 return 0; 1328 return 0;
1329 1329
1330 if (pixmap == None
1331 || pmap_width != window_width
1332 || pmap_height != window_height)
1333 {
1334 if (pixmap)
1335 XFreePixmap (target->dpy, pixmap);
1330 Pixmap tiled_root_pmap = XCreatePixmap (dpy, target->vt, window_width, window_height, target->depth); 1336 pixmap = XCreatePixmap (target->dpy, target->vt, window_width, window_height, target->depth);
1337 pmap_width = window_width;
1338 pmap_height = window_height;
1339 }
1331 1340
1332 if (tiled_root_pmap == None) /* something really bad happened - abort */ 1341 if (pixmap == None)
1333 return 0; 1342 return 0;
1334 1343
1335 /* straightforward pixmap copy */ 1344 /* straightforward pixmap copy */
1336 while (sx < 0) sx += (int)root_width; 1345 while (sx < 0) sx += (int)root_width;
1337 while (sy < 0) sy += (int)root_height; 1346 while (sy < 0) sy += (int)root_height;
1342 gcv.ts_y_origin = -sy; 1351 gcv.ts_y_origin = -sy;
1343 gc = XCreateGC (dpy, target->vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); 1352 gc = XCreateGC (dpy, target->vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv);
1344 1353
1345 if (gc) 1354 if (gc)
1346 { 1355 {
1347 XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height); 1356 XFillRectangle (dpy, pixmap, gc, 0, 0, window_width, window_height);
1348 result |= transpPmapTiled; 1357 result |= transpPmapTiled;
1349 XFreeGC (dpy, gc); 1358 XFreeGC (dpy, gc);
1350 1359
1351 if (!(flags & CLIENT_RENDER)) 1360 if (!(flags & CLIENT_RENDER))
1352 { 1361 {
1353 if ((flags & blurNeeded) 1362 if ((flags & blurNeeded)
1354 && (flags & HAS_RENDER_CONV)) 1363 && (flags & HAS_RENDER_CONV))
1355 { 1364 {
1356 if (blur_pixmap (tiled_root_pmap, target->visual, window_width, window_height)) 1365 if (blur_pixmap (pixmap, target->visual, window_width, window_height))
1357 result |= transpPmapBlurred; 1366 result |= transpPmapBlurred;
1358 } 1367 }
1359 if ((flags & tintNeeded) 1368 if ((flags & tintNeeded)
1360 && (flags & (tintWholesome | HAS_RENDER))) 1369 && (flags & (tintWholesome | HAS_RENDER)))
1361 { 1370 {
1362 if (tint_pixmap (tiled_root_pmap, target->visual, window_width, window_height)) 1371 if (tint_pixmap (pixmap, target->visual, window_width, window_height))
1363 result |= transpPmapTinted; 1372 result |= transpPmapTinted;
1364 } 1373 }
1365 } /* server side rendering completed */ 1374 } /* server side rendering completed */
1366
1367 if (pixmap)
1368 XFreePixmap (dpy, pixmap);
1369
1370 pixmap = tiled_root_pmap;
1371 pmap_width = window_width;
1372 pmap_height = window_height;
1373 } 1375 }
1374 else
1375 XFreePixmap (dpy, tiled_root_pmap);
1376 1376
1377 if (recoded_root_pmap != root_pixmap) 1377 if (recoded_root_pmap != root_pixmap)
1378 XFreePixmap (dpy, recoded_root_pmap); 1378 XFreePixmap (dpy, recoded_root_pmap);
1379 1379
1380 return result; 1380 return result;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines