repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 49f22fbba9ebe8f218a6b783a0dfbcf713e7fd90:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 49f22fbba9ebe8f218a6b783a0dfbcf713e7fd90
Author: Marc Lehmann 
Date:   Thu Jun 7 08:45:34 2012 +0000

    *** empty log message ***

diff --git a/src/rxvtimg.C b/src/rxvtimg.C
index 3bf756abebdcaab3e5e0567e7fd47707e465d70f..
index ..21d623671d15ce218be9d20941f70bfd1532d828 100644
--- a/src/rxvtimg.C
+++ b/src/rxvtimg.C
@@ -116,9 +116,6 @@ rxvt_img::src_picture ()
   pa.repeat = repeat;
   Picture pic = XRenderCreatePicture (dpy, pm, format, CPRepeat, &pa);

-  XRectangle clip = { -x, -y, min (w, ref->w), min (h, ref->h) };
-  XRenderSetPictureClipRectangles (dpy, pic, 0, 0, &clip, 1);
-
   return pic;
 }

@@ -421,15 +418,18 @@ rxvt_img::reify ()
 rxvt_img *
 rxvt_img::sub_rect (int x, int y, int width, int height)
 {
-  rxvt_img *img = clone ();
+  bool need_reify = w < width || h < height;

-  //TODO: width > w, must reify
+  rxvt_img *img = clone ();

   img->x += x;
   img->y += y;
   img->w = width;
   img->h = height;

+  if (need_reify)
+    img->reify ();
+
   return img;
 }

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