--- rxvt-unicode/src/background.C 2010/11/06 17:51:11 1.113 +++ rxvt-unicode/src/background.C 2010/11/16 15:49:56 1.118 @@ -30,6 +30,10 @@ # include #endif +#ifndef FilterConvolution +#define FilterConvolution "convolution" +#endif + #define DO_TIMING_TEST 0 #if DO_TIMING_TEST @@ -174,7 +178,7 @@ # endif return false; -}; +} bool bgPixmap_t::need_client_side_rendering () { @@ -668,20 +672,14 @@ XGCValues gcv; GC gc; - if (pixmap) - { - if (pmap_width != new_pmap_width - || pmap_height != new_pmap_height - || pmap_depth != target->depth) - { - XFreePixmap (target->dpy, pixmap); - pixmap = None; - } - } - /* create Pixmap */ - if (pixmap == None) + if (pixmap == None + || pmap_width != new_pmap_width + || pmap_height != new_pmap_height + || pmap_depth != target->depth) { + if (pixmap) + XFreePixmap (target->dpy, pixmap); pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); pmap_width = new_pmap_width; pmap_height = new_pmap_height; @@ -799,19 +797,13 @@ } } - if (pixmap) - { - if (pmap_width != new_pmap_width - || pmap_height != new_pmap_height - || pmap_depth != target->depth) - { - XFreePixmap (target->dpy, pixmap); - pixmap = None; - } - } - - if (pixmap == None) + if (pixmap == None + || pmap_width != new_pmap_width + || pmap_height != new_pmap_height + || pmap_depth != target->depth) { + if (pixmap) + XFreePixmap (target->dpy, pixmap); pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); pmap_width = new_pmap_width; pmap_height = new_pmap_height; @@ -1241,7 +1233,7 @@ { XRenderColor mask_c; - memset (&mask_c, (shade > 100) ? 0xFF : 0x0, sizeof (mask_c)); + mask_c.red = mask_c.green = mask_c.blue = shade > 100 ? 0xffff : 0; mask_c.alpha = 0xffff; XRenderFillRectangle (dpy, PictOpSrc, overlay_pic, &mask_c, 0, 0, 1, 1); @@ -1369,10 +1361,7 @@ XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height); result |= transpPmapTiled; XFreeGC (dpy, gc); - } - if (tiled_root_pmap != None) - { if (!need_client_side_rendering ()) { if ((flags & blurNeeded) @@ -1397,6 +1386,8 @@ pmap_height = window_height; pmap_depth = target->depth; } + else + XFreePixmap (dpy, tiled_root_pmap); if (recoded_root_pmap != root_pixmap) XFreePixmap (dpy, recoded_root_pmap);