-- 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: fcf18973017792d77b211b8a9eef6271027e36cc:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit fcf18973017792d77b211b8a9eef6271027e36cc
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Sat Dec 29 18:12:53 2012 +0000

    Properly manage BG_IS_TRANSPARENT flag in core bg image code.

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

index fa6cd7f3575a14049ca39f5071e30ad11df50f9a..

index ..6b9dba4aba97ffa95c4fbd133de428c2759b74f5 100644

--- a/src/background.C
+++ b/src/background.C
@@ -47,7 +47,7 @@ bool
 rxvt_term::bg_window_size_sensitive ()
 {
 # if BG_IMAGE_FROM_ROOT
-  if (bg_flags & BG_IS_TRANSPARENT)
+  if (option (Opt_transparent))
     return true;
 # endif

@@ -68,7 +68,7 @@ bool
 rxvt_term::bg_window_position_sensitive ()
 {
 # if BG_IMAGE_FROM_ROOT
-  if (bg_flags & BG_IS_TRANSPARENT)
+  if (option (Opt_transparent))
     return true;
 # endif

@@ -505,11 +505,11 @@ rxvt_term::bg_render ()

   bg_invalidate ();
 # if BG_IMAGE_FROM_ROOT
-  if (bg_flags & BG_IS_TRANSPARENT)
+  if (option (Opt_transparent))
     {
       /*  we need to re-generate transparency pixmap in that case ! */
       if (render_root_image ())
-        bg_flags |= BG_IS_VALID;
+        bg_flags |= BG_IS_VALID | BG_IS_TRANSPARENT;
     }
 # endif

@@ -539,8 +539,6 @@ rxvt_term::bg_init ()
 #if BG_IMAGE_FROM_ROOT
   if (option (Opt_transparent))
     {
-      bg_set_transparent ();
-
       if (rs [Rs_blurradius])
         root_effects.set_blur (rs [Rs_blurradius]);

diff --git a/src/rxvt.h b/src/rxvt.h

index 213f73ed68b4e4ec2f77854ea1d23d5ea3cfc075..

index ..9a0b3a695d1caa2ee3681536cf4d2cd0d4cae559 100644

--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -1198,10 +1198,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen
   rxvt_img *root_img;
   image_effects root_effects;

-  void bg_set_transparent ()
-  {
-    bg_flags |= BG_IS_TRANSPARENT;
-  }
   void bg_set_root_pixmap ();
   bool render_root_image ();
 # endif
@@ -1216,7 +1212,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen
   void bg_render ();
   void bg_invalidate ()
   {
-    bg_flags &= ~BG_IS_VALID;
+    bg_flags &= ~(BG_IS_VALID | BG_IS_TRANSPARENT);
   }
 #endif

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

-- Response ended

-- Page fetched on Sun Jun 2 10:38:51 2024