-- 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: 57b3c195a382363db645c7ebde64d5b3e4400454:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit 57b3c195a382363db645c7ebde64d5b3e4400454
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Thu Dec 29 16:45:22 2011 +0000

    Move client-side tinting in make_transparency_pixmap.

diff --git a/src/background.C b/src/background.C

index 562a7458dda4cb116eccd5a828ad0539fbf48093..

index ..1467816e9cc899a9211a51880306b0be964fe580 100644

--- a/src/background.C
+++ b/src/background.C
@@ -1301,7 +1301,6 @@ rxvt_term::make_transparency_pixmap ()
     {
       XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height);
       result |= BG_IS_VALID | (bg_flags & BG_EFFECTS_FLAGS);
-      XFreeGC (dpy, gc);

       if (!(bg_flags & BG_CLIENT_RENDER))
         {
@@ -1315,7 +1314,23 @@ rxvt_term::make_transparency_pixmap ()
               if (tint_pixmap (bg_pixmap, visual, window_width, window_height))
                 result &= ~BG_NEEDS_TINT;
             }
+#  ifndef HAVE_AFTERIMAGE
+          if (result & BG_NEEDS_TINT)
+            {
+              XImage *ximage = XGetImage (dpy, bg_pixmap, 0, 0, bg_pmap_width, bg_pmap_height, AllPlanes, ZPixmap);
+              if (ximage)
+                {
+                  /* our own client-side tinting */
+                  tint_ximage (DefaultVisual (dpy, display->screen), ximage);
+
+                  XPutImage (dpy, bg_pixmap, gc, ximage, 0, 0, 0, 0, ximage->width, ximage->height);
+                  XDestroyImage (ximage);
+                }
+            }
+#  endif
         } /* server side rendering completed */
+
+      XFreeGC (dpy, gc);
     }

   if (recoded_root_pmap != root_pixmap)
@@ -1361,34 +1376,6 @@ rxvt_term::bg_render ()
     }
 # endif

-# if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE)
-  XImage *result = NULL;
-
-  if (tr_flags & BG_NEEDS_TINT)
-    {
-      result = XGetImage (dpy, bg_pixmap, 0, 0, bg_pmap_width, bg_pmap_height, AllPlanes, ZPixmap);
-    }
-
-  if (result)
-    {
-      /* our own client-side tinting */
-      //if (tr_flags & BG_NEEDS_TINT)
-      if (1)
-        tint_ximage (DefaultVisual (dpy, display->screen), result);
-
-      GC gc = XCreateGC (dpy, vt, 0UL, NULL);
-
-      if (gc)
-        {
-          XPutImage (dpy, bg_pixmap, gc, result, 0, 0, 0, 0, result->width, result->height);
-
-          XFreeGC (dpy, gc);
-        }
-
-      XDestroyImage (result);
-    }
-# endif
-
   if (!(bg_flags & BG_IS_VALID))
     {
       if (bg_pixmap != None)

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

-- Response ended

-- Page fetched on Sun Jun 2 09:57:00 2024