repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 1ba335ac2e71fbf4451ab2a58ea9aed09886eb48:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 1ba335ac2e71fbf4451ab2a58ea9aed09886eb48
Author: Marc Lehmann 
Date:   Sun Jun 10 10:35:03 2012 +0000

    *** empty log message ***

diff --git a/src/rxvtimg.C b/src/rxvtimg.C
index 9afd45b2ab8183b6d589dcad262a9c8d74548a7b..
index ..69dfcebc6fe35ca3cd76d0b8ff9d36b385ff0f8b 100644
--- a/src/rxvtimg.C
+++ b/src/rxvtimg.C
@@ -52,6 +52,7 @@ rxvt_img::new_from_root (rxvt_screen *s)
 }

 # if HAVE_PIXBUF
+
 rxvt_img *
 rxvt_img::new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb)
 {
@@ -168,6 +169,7 @@ rxvt_img::new_from_file (rxvt_screen *s, const char *filename)

   return img;
 }
+
 # endif

 void
@@ -226,11 +228,14 @@ rxvt_img::unshare ()
 void
 rxvt_img::fill (const rxvt_color &c)
 {
-  XGCValues gcv;
-  gcv.foreground = c;
-  GC gc = XCreateGC (s->display->dpy, pm, GCForeground, &gcv);
-  XFillRectangle (s->display->dpy, pm, gc, 0, 0, w, h);
-  XFreeGC (s->display->dpy, gc);
+  rgba cc;
+  c.get (cc);
+  XRenderColor rc = { cc.r, cc.g, cc.b, cc.a };
+
+  Display *dpy = s->display->dpy;
+  Picture src = src_picture ();
+  XRenderFillRectangle (dpy, PictOpSrc, src, &rc, 0, 0, w, h);
+  XRenderFreePicture (dpy, src);
 }

 static void
@@ -310,6 +315,7 @@ rxvt_img::blur (int rh, int rv)

   free (kernel);
   free (params);
+
   XRenderFreePicture (dpy, src);
   XRenderFreePicture (dpy, dst);
   XRenderFreePicture (dpy, tmp);

-----END OF PAGE-----