repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 8ea0a7e65c277f5670421b5b734411324fb1b9c6:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 8ea0a7e65c277f5670421b5b734411324fb1b9c6
Author: Marc Lehmann 
Date:   Fri Jun 15 19:50:56 2012 +0000

    *** empty log message ***

diff --git a/src/perl/background b/src/perl/background
index fee506d9780cf22b0a2104e359acf3714006796a..
index ..edfc27092b8b481f3e69a1d174e7d72988d66996 100644
--- a/src/perl/background
+++ b/src/perl/background
@@ -308,9 +308,14 @@ multiple copies of the same image to apply different effects to.
 Takes any number of images and merges them together, creating a single
 image containing them all.

+This function is called automatically when an expression returns multiple
+images.
+
 =cut

    sub merge(@) {
+      return $_[0] unless $#_;
+
       # rather annoyingly clumsy, but optimisation is for another time

       my $x0 = +1e9;
@@ -907,8 +912,8 @@ sub recalculate {

    # evaluate user expression

-   my $img = eval { $self->{expr}->() };
-   warn $@ if $@;#d#
+   my $img = eval { urxvt::bgdsl::merge $self->{expr}->() };
+   die $@ if $@;
    die "background-expr did not return an image.\n" if !UNIVERSAL::isa $img, "urxvt::img";

    # if the expression is sensitive to external events, prepare reevaluation then
diff --git a/src/rxvtimg.h b/src/rxvtimg.h
index 64b4f52cf4d7c97cfd9d8d462ca66ccb1796ca13..
index ..3c46c6e708e5721347d4b161e0842b40dc343ea4 100644
--- a/src/rxvtimg.h
+++ b/src/rxvtimg.h
@@ -90,6 +90,10 @@ struct rxvt_img
   }

   void draw (rxvt_img *img, int op = PictOpOver, nv mask = 1.);
+#if 0
+  void draw (rxvt_img *img, int op = PictOpOver, nv mask = 1.,
+             nv px, nv py, nv qx, nv qy, nv rx, nv ry, nv sx, nv sy);
+#endif

   // copy
   rxvt_img *reify (); // make x, y 0, make real width/height

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