-- 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: 94899f4b4743b3214905ec67d1714b9a04591069: path_to: revision_to:
commit 94899f4b4743b3214905ec67d1714b9a04591069 Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com> Date: Tue Apr 10 15:08:47 2012 +0000 Simplify. diff --git a/src/background.C b/src/background.C
--- a/src/background.C +++ b/src/background.C @@ -688,23 +688,10 @@ rxvt_term::bg_set_blur (const char *geom) void rxvt_term::set_tint_shade_flags () { - rgba c; - bool has_shade = shade != 100; - - bg_flags &= ~BG_TINT_FLAGS; - - if (bg_flags & BG_TINT_SET) - { - tint.get (c); - if (!has_shade - && (c.r <= 0x00ff || c.r >= 0xff00) - && (c.g <= 0x00ff || c.g >= 0xff00) - && (c.b <= 0x00ff || c.b >= 0xff00)) - bg_flags |= BG_TINT_BITAND; - } - - if (has_shade || (bg_flags & BG_TINT_SET)) + if (shade != 100 || (bg_flags & BG_TINT_SET)) bg_flags |= BG_NEEDS_TINT; + else + bg_flags &= ~BG_NEEDS_TINT; } bool @@ -714,6 +701,16 @@ rxvt_term::bg_set_tint (rxvt_color &new_tint) { tint = new_tint; bg_flags |= BG_TINT_SET; + + rgba c; + tint.get (c); + if ((c.r <= 0x00ff || c.r >= 0xff00) + && (c.g <= 0x00ff || c.g >= 0xff00) + && (c.b <= 0x00ff || c.b >= 0xff00)) + bg_flags |= BG_TINT_BITAND; + else + bg_flags &= ~BG_TINT_BITAND; + set_tint_shade_flags (); return true; } @@ -833,7 +830,7 @@ rxvt_term::tint_pixmap (Pixmap pixmap, Visual *visual, int width, int height) { bool ret = false; - if (bg_flags & BG_TINT_BITAND) + if (shade == 100 && (bg_flags & BG_TINT_BITAND)) { XGCValues gcv; GC gc; diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -1097,7 +1097,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen BG_TINT_SET = 1 << 5, BG_TINT_BITAND = 1 << 6, - BG_TINT_FLAGS = BG_NEEDS_TINT | BG_TINT_BITAND, BG_HAS_RENDER = 1 << 7, BG_HAS_RENDER_CONV = 1 << 8,
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 10:44:47 2024