--- rxvt-unicode/src/rxvtimg.C 2012/06/08 17:22:48 1.62 +++ rxvt-unicode/src/rxvtimg.C 2012/06/08 21:48:07 1.66 @@ -211,7 +211,6 @@ if (ref->cnt == 1 && ref->ours) return; - //TODO: maybe should reify instead Pixmap pm2 = XCreatePixmap (s->display->dpy, s->display->root, ref->w, ref->h, format->depth); GC gc = XCreateGC (s->display->dpy, pm, 0, 0); XCopyArea (s->display->dpy, pm, pm2, gc, 0, 0, ref->w, ref->h, 0, 0); @@ -333,7 +332,7 @@ } void -rxvt_img::brightness (unsigned short r, unsigned short g, unsigned short b, unsigned short a) +rxvt_img::brightness (uint16_t r, uint16_t g, uint16_t b, uint16_t a) { Display *dpy = s->display->dpy; Picture src = create_xrender_mask (dpy, pm, True); @@ -353,10 +352,13 @@ } void -rxvt_img::contrast (unsigned short r, unsigned short g, unsigned short b, unsigned short a) +rxvt_img::contrast (uint16_t r, uint16_t g, uint16_t b, uint16_t a) { if (!(s->display->flags & DISPLAY_HAS_RENDER_MUL)) - return; + { + rxvt_warn ("rxvt_img::contrast operation not supported on this display, RENDER extension too old.\n"); + return; + } Display *dpy = s->display->dpy; Picture src = create_xrender_mask (dpy, pm, True); @@ -472,10 +474,8 @@ for (int j = 0; j < 3; ++j) xfrm.matrix [i][j] = XDoubleToFixed (matrix [i * 3 + j]); -#if 0 xfrm.matrix [0][2] -= XDoubleToFixed (x);//TODO xfrm.matrix [1][2] -= XDoubleToFixed (y); -#endif XRenderSetPictureFilter (dpy, src, "good", 0, 0); XRenderSetPictureTransform (dpy, src, &xfrm);