From c339b38292101a3c795724be01046f59c57f91af Mon Sep 17 00:00:00 2001 From: root Date: Wed, 5 Jul 2006 22:46:14 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 1 + src/command.C | 13 +++++++++++++ src/init.C | 9 ++------- src/main.C | 11 +---------- src/rxvt.h | 1 + 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Changes b/Changes index 4a0e8f4b..8cb782c6 100644 --- a/Changes +++ b/Changes @@ -53,6 +53,7 @@ TODO: investigate the color-management patch send ages ago, as well as other pos - slap in a using namespace std, might help on platforms that don't follow C++ closely enough. - fix mailto url regex, spotted within milliseconds by Jost Krieger. + - applied fade_color_update_func.patch by WU Fengguang. 7.7 Tue Feb 21 12:32:49 CET 2006 - use double-buffered drawing (xft fonts only). On many driver/hardware diff --git a/src/command.C b/src/command.C index a2d23dbb..c405c811 100644 --- a/src/command.C +++ b/src/command.C @@ -1777,6 +1777,19 @@ rxvt_term::focus_out () } } +void +rxvt_term::update_fade_color (unsigned int idx) +{ +#if OFF_FOCUS_FADING + if (rs[Rs_fade]) + { + rgba c; + pix_colors [Color_fade].get (c); + pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); + } +#endif +} + #if TRANSPARENT void rxvt_term::rootwin_cb (XEvent &ev) diff --git a/src/init.C b/src/init.C index 96c982c6..a4109cf2 100644 --- a/src/init.C +++ b/src/init.C @@ -750,13 +750,8 @@ rxvt_term::Get_Colours () #endif /* KEEP_SCROLLCOLOR */ #ifdef OFF_FOCUS_FADING - if (rs[Rs_fade]) - for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) - { - rgba c; - pix_colors [Color_fade].get (c); - pix_colors_focused [i].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused[i],c); - } + for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) + update_fade_color (i); #endif } diff --git a/src/main.C b/src/main.C index 2cb3b28d..1acc5f7d 100644 --- a/src/main.C +++ b/src/main.C @@ -938,18 +938,9 @@ rxvt_term::set_window_color (int idx, const char *color) /* XSetWindowAttributes attr; */ /* Cursor cursor; */ done: - -#if OFF_FOCUS_FADING - if (rs[Rs_fade]) - { - rgba c; - pix_colors [Color_fade].get (c); - pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); - } -#endif - /*TODO: handle Color_BD, scrollbar background, etc. */ + update_fade_color (idx); recolour_cursor (); scr_recolour (); } diff --git a/src/rxvt.h b/src/rxvt.h index 58d9326f..608b2c52 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -1229,6 +1229,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen { void button_release (XButtonEvent &ev); void focus_in (); void focus_out (); + void update_fade_color (unsigned int idx); int check_our_parents (); #ifdef PRINTPIPE FILE *popen_printer (); -- 2.34.1