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.69 by sf-exg, Mon Oct 4 22:06:26 2010 UTC vs.
Revision 1.70 by sf-exg, Tue Oct 5 20:22:25 2010 UTC

1048 1048
1049 return false; 1049 return false;
1050} 1050}
1051 1051
1052bool 1052bool
1053bgPixmap_t::tint_pixmap (Pixmap pixmap) 1053bgPixmap_t::tint_pixmap (Pixmap pixmap, Window root, int width, int height)
1054{ 1054{
1055 Window root = target->display->root;
1056 Display *dpy = target->dpy; 1055 Display *dpy = target->dpy;
1057 int window_width = target->szHint.width;
1058 int window_height = target->szHint.height;
1059 bool ret = false; 1056 bool ret = false;
1060 1057
1061 if (flags & tintWholesome) 1058 if (flags & tintWholesome)
1062 { 1059 {
1063 XGCValues gcv; 1060 XGCValues gcv;
1070 gcv.function = GXand; 1067 gcv.function = GXand;
1071 gcv.fill_style = FillSolid; 1068 gcv.fill_style = FillSolid;
1072 gc = XCreateGC (dpy, root, GCFillStyle | GCForeground | GCFunction, &gcv); 1069 gc = XCreateGC (dpy, root, GCFillStyle | GCForeground | GCFunction, &gcv);
1073 if (gc) 1070 if (gc)
1074 { 1071 {
1075 XFillRectangle (dpy, pixmap, gc, 0, 0, window_width, window_height); 1072 XFillRectangle (dpy, pixmap, gc, 0, 0, width, height);
1076 ret = true; 1073 ret = true;
1077 XFreeGC (dpy, gc); 1074 XFreeGC (dpy, gc);
1078 } 1075 }
1079 } 1076 }
1080 else 1077 else
1142 mask_c.alpha = 0; 1139 mask_c.alpha = 0;
1143 mask_c.red = 0xffff - c.r; 1140 mask_c.red = 0xffff - c.r;
1144 mask_c.green = 0xffff - c.g; 1141 mask_c.green = 0xffff - c.g;
1145 mask_c.blue = 0xffff - c.b; 1142 mask_c.blue = 0xffff - c.b;
1146 XRenderFillRectangle (dpy, PictOpSrc, mask_pic, &mask_c, 0, 0, 1, 1); 1143 XRenderFillRectangle (dpy, PictOpSrc, mask_pic, &mask_c, 0, 0, 1, 1);
1147 XRenderComposite (dpy, PictOpOver, overlay_pic, mask_pic, back_pic, 0, 0, 0, 0, 0, 0, window_width, window_height); 1144 XRenderComposite (dpy, PictOpOver, overlay_pic, mask_pic, back_pic, 0, 0, 0, 0, 0, 0, width, height);
1148 ret = true; 1145 ret = true;
1149 } 1146 }
1150 1147
1151 XRenderFreePicture (dpy, mask_pic); 1148 XRenderFreePicture (dpy, mask_pic);
1152 XRenderFreePicture (dpy, overlay_pic); 1149 XRenderFreePicture (dpy, overlay_pic);
1295 { 1292 {
1296 if (!need_client_side_rendering ()) 1293 if (!need_client_side_rendering ())
1297 { 1294 {
1298 if ((flags & tintNeeded)) 1295 if ((flags & tintNeeded))
1299 { 1296 {
1300 if (tint_pixmap (tiled_root_pmap)) 1297 if (tint_pixmap (tiled_root_pmap, root, window_width, window_height))
1301 result |= transpPmapTinted; 1298 result |= transpPmapTinted;
1302 } 1299 }
1303 } /* server side rendering completed */ 1300 } /* server side rendering completed */
1304 1301
1305 if (pixmap) 1302 if (pixmap)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines