-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: 1645826f63a7b5f77430f5d9c4758ab6e714bdf3:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit 1645826f63a7b5f77430f5d9c4758ab6e714bdf3
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Wed Jun 6 20:55:37 2012 +0000

    *** empty log message ***

diff --git a/src/perl/background b/src/perl/background

index 82f5da6c19b78860a504e72aa44212e603f5033b..

index ..7f14b53b686dfee48153d68d217238cfd338d341 100644

--- a/src/perl/background
+++ b/src/perl/background
@@ -4,13 +4,13 @@
 #:META:X_RESOURCE:%.enable:boolean:some boolean
 #:META:X_RESOURCE:%.extra.:value:extra config

-our $EXPR = 'move load "/root/pix/das_fette_schwein.jpg", repeat_wrap, X, Y';
-$EXPR = '
-   rotate W, H, 50, 50, counter 1/59.95, repeat_mirror,
-   clip X, Y, W, H, repeat_mirror,
-   load "/root/pix/das_fette_schwein.jpg"
-';
-$EXPR = 'solid "red"';
+our $EXPR = 'move X, Y, load "MagnoliaAlpha.png"';
+#$EXPR = '
+#   rotate W, H, 50, 50, counter 1/59.95, repeat_mirror,
+#   clip X, Y, W, H, repeat_mirror,
+#   load "/root/pix/das_fette_schwein.jpg"
+#';
+#$EXPR = 'solid "red"';
 #$EXPR = 'blur root, 10, 10'
 #$EXPR = 'blur move (root, -x, -y), 5, 5'
 #resize load "/root/pix/das_fette_schwein.jpg", w, h
diff --git a/src/rxvtimg.C b/src/rxvtimg.C

index ed5625120d57612f502ea2bb667c9bbfe24caa16..

index ..867c5141f61a0af49294cde274e5a18e4e44e773 100644

--- a/src/rxvtimg.C
+++ b/src/rxvtimg.C
@@ -436,9 +436,7 @@ rxvt_img::convert_to (XRenderPictFormat *new_format, const rxvt_color &bg)
   Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0);
   int op = PictOpSrc;

-  printf ("fa %x,%x fb %x,%x\n", format->direct.alpha, format->direct.alphaMask, new_format->direct.alpha, new_format->direct.alphaMask);//D
-
-  if (format->direct.alpha && !new_format->direct.alpha)
+  if (format->direct.alphaMask && !new_format->direct.alphaMask)
     {
       // does it have to be that complicated
       rgba c;
diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs

index f8f3483472d7357d2d57665c80c170817610f937..

index ..784cc2716e6dd9be5d44f61b4fe25b57f66a5fe3 100644

--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -2094,11 +2094,18 @@ rxvt_term::set_background (rxvt_img *img)

         if (img) // TODO: cannot be false
           {
+            XRenderPictFormat *f = XRenderFindVisualFormat (THIS->dpy, THIS->visual);
+            rxvt_img *img2 = 0;
+
+            if (f != img->format)
+              img = img2 = img->convert_to (f, THIS->pix_colors [Color_bg]);
+
             img->unshare ();
-            //TODO: convetr to visual, possibly precompose with colour
             THIS->bg_pixmap = img->steal ();
             THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH;
             THIS->bg_valid_since = ev::now (); // TODO: extra bloat
+
+            delete img2;
           }

 #endif

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

-- Response ended

-- Page fetched on Sun Jun 2 10:42:04 2024