-- 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: cb72f763eed4f993115ced75baf4f40ee3fdbb54: path_to: revision_to:
commit cb72f763eed4f993115ced75baf4f40ee3fdbb54 Author: Marc Lehmann <schmorp@schmorp.de> Date: Fri Jul 30 14:59:12 2004 +0000 *** empty log message *** diff --git a/README.configure b/README.configure
--- a/README.configure +++ b/README.configure @@ -73,6 +73,8 @@ report when a combination doesn't work, so it can be fixed. Marc Lehmann --enable-transparency add support for inheriting parent backgrounds thus giving a fake transparency to the term +--enable-fading + add support for fading the text when focus is lost. --enable-tinting add support for tinting of transparent backgrounds. --enable-menubar diff --git a/autoconf/config.h.in b/autoconf/config.h.in
--- a/autoconf/config.h.in +++ b/autoconf/config.h.in @@ -331,6 +331,9 @@ /* Define if you want 8 bit control sequences */ #undef EIGHT_BIT_CONTROLS +/* Define if you want faded colors when focus is lost */ +#undef OFF_FOCUS_FADING + /* Define if you want your background to be tinted */ #undef TINTING diff --git a/autoconf/configure.in b/autoconf/configure.in
--- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -70,6 +70,7 @@ support_frills=no support_linespace=no support_inheritpixmap=no support_tinting=no +support_fading=no support_keepscrolling=no support_selectionscrolling=no support_menubar=no @@ -113,6 +114,7 @@ AC_ARG_ENABLE(everything, support_linespace=yes support_inheritpixmap=yes support_tinting=yes + support_fading=yes support_keepscrolling=yes support_selectionscrolling=yes support_lastlog=yes @@ -191,6 +193,12 @@ AC_ARG_ENABLE(tinting, support_tinting=$enableval fi]) +AC_ARG_ENABLE(fading, + [ --enable-tinting enable colors fading when off focus], + [if test x$enableval = xyes -o x$enableval = xno; then + support_fading=$enableval + fi]) + AC_ARG_ENABLE(menubar, [ --enable-menubar enable menubar], [if test x$enableval = xyes -o x$enableval = xno; then @@ -1175,6 +1183,9 @@ dnl# -------------------------------------------------------------------------- if test x$support_8bitctrls = xyes; then AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences) fi +if test x$support_fading = xyes; then + AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost) +fi if test x$support_tinting = xyes; then AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) fi diff --git a/doc/rxvt.1 b/doc/rxvt.1
--- a/doc/rxvt.1 +++ b/doc/rxvt.1 @@ -56,6 +56,8 @@ resource \fBjumpScroll\fP\&. Turn on/off inheriting parent window\&'s pixmap\&. Alternative form is \fB-tr\fP; resource \fBinheritPixmap\fP\&. +.IP "\fB-fade\fP \fInumber\fP" +Fade the text by the given percentage when focus is lost\&. .IP "\fB-tint\fP \fIcolour\fP" Tint the transparent background pixmap with the given colour\&. .IP "\fB-bg\fP \fIcolour\fP" diff --git a/doc/rxvt.tbl b/doc/rxvt.tbl
--- a/doc/rxvt.tbl +++ b/doc/rxvt.tbl @@ -53,6 +53,8 @@ resource \fBjumpScroll\fP\&. Turn on/off inheriting parent window\&'s pixmap\&. Alternative form is \fB-tr\fP; resource \fBinheritPixmap\fP\&. +.IP "\fB-fade\fP \fInumber\fP" +Fade the text by the given percentage when focus is lost\&. .IP "\fB-tint\fP \fIcolour\fP" Tint the transparent background pixmap with the given colour\&. .IP "\fB-bg\fP \fIcolour\fP" diff --git a/doc/yodl/rxvt-options.yo b/doc/yodl/rxvt-options.yo
--- a/doc/yodl/rxvt-options.yo +++ b/doc/yodl/rxvt-options.yo @@ -1,4 +1,4 @@ -COMMENT(-- $Id: rxvt-options.yo,v 1.12 2004/07/26 14:57:12 root Exp $ --) +COMMENT(-- $Id: rxvt-options.yo,v 1.13 2004/07/30 14:59:12 root Exp $ --) COMMENT(----------------------------------------------------------------------) manpageoptions() @@ -39,6 +39,8 @@ startdit() Turn on/off inheriting parent window's pixmap. Alternative form is bf(-tr); resource bf(inheritPixmap). + dit(bf(-fade) em(number)) + Fade the text by the given percentage when focus is lost. dit(bf(-tint) em(colour)) Tint the transparent background pixmap with the given colour. dit(bf(-bg) em(colour)) diff --git a/reconf b/reconf
--- a/reconf +++ b/reconf @@ -6,9 +6,9 @@ ./configure --prefix=/opt/rxvt --enable-utmp \ --enable-wtmp --enable-lastlog --enable-xim --disable-strings \ --with-term=rxvt --disable-keepscrolling --enable-xft --enable-mousewheel \ - --with-name=rxvt --enable-selectionscrolling \ - --enable-frills --enable-swapscreen --enable-transparency \ + --with-name=rxvt --enable-selectionscrolling --enable-pointer-blank \ + --enable-frills --enable-swapscreen --enable-transparency --enable-slipwheeling \ --with-codesets=eu,jp --enable-menubar --enable-tinting \ - --enable-cursor-blink --enable-pointer-blank --enable-text-blink \ + --enable-cursor-blink --enable-text-blink --enable-fading \ --enable-plain-scroll --enable-rxvt-scroll --enable-combining \ "$@" diff --git a/src/main.C b/src/main.C
--- a/src/main.C +++ b/src/main.C @@ -244,7 +244,10 @@ rxvt_term::~rxvt_term () // TODO: free pixcolours, colours should become part of rxvt_display - delete PixColors; + delete PixColorsFocused; +#ifdef OFF_FOCUS_FADING + delete PixColorsUnFocused; +#endif displays.put (display); @@ -957,7 +960,7 @@ rxvt_term::set_window_color (int idx, const char *color) { /* bright colors */ i -= 8; # ifndef NO_BRIGHTCOLOR - PixColors[idx] = PixColors[minBrightCOLOR + i]; + PixColorsFocused[idx] = PixColorsFocused[minBrightCOLOR + i]; SET_PIXCOLOR (idx); goto Done; # endif @@ -965,7 +968,7 @@ rxvt_term::set_window_color (int idx, const char *color) } if (i >= 0 && i <= 7) { /* normal colors */ - PixColors[idx] = PixColors[minCOLOR + i]; + PixColorsFocused[idx] = PixColorsFocused[minCOLOR + i]; SET_PIXCOLOR (idx); goto Done; } @@ -992,15 +995,17 @@ rxvt_term::set_window_color (int idx, const char *color) } # endif - PixColors[idx] = xcol; + PixColorsFocused[idx] = xcol; SET_PIXCOLOR (idx); /* XSetWindowAttributes attr; */ /* Cursor cursor; */ Done: +#ifdef OFF_FOCUS_FADING + PixColorsUnFocused[idx] = PixColorsFocused[idx].fade (display, atoi (rs[Rs_fade])); +#endif if (idx == Color_bg && ! (Options & Opt_transparent)) - XSetWindowBackground (display->display, TermWin.vt, - PixColors[Color_bg]); + XSetWindowBackground (display->display, TermWin.vt, PixColors[Color_bg]); /* handle Color_BD, scrollbar background, etc. */ @@ -1018,8 +1023,8 @@ rxvt_term::recolour_cursor () { XColor xcol[2]; - xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColors[Color_pointer_fg] : PixColors[Color_fg]; - xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColors[Color_pointer_bg] : PixColors[Color_bg]; + xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg]; + xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg]; XQueryColors (display->display, XCMAP, xcol, 2); XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); } diff --git a/src/rxvtcolor.C b/src/rxvtcolor.C
--- a/src/rxvtcolor.C +++ b/src/rxvtcolor.C @@ -409,3 +409,18 @@ rxvt_color::free (rxvt_display *display) #endif } +rxvt_color +rxvt_color::fade (rxvt_display *display, int percent) +{ + unsigned short cr, cg, cb; + rxvt_color faded; + + get (display, cr, cg, cb); + faded.set (display, + cr * percent / 100, + cg * percent / 100, + cb * percent / 100); + + return faded; +} + diff --git a/src/rxvtcolor.h b/src/rxvtcolor.h
--- a/src/rxvtcolor.h +++ b/src/rxvtcolor.h @@ -168,6 +168,8 @@ struct rxvt_color { bool set (rxvt_display *display, const char *name); bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb); + rxvt_color fade (rxvt_display *, int percent); + void free (rxvt_display *display); }; diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in
--- a/src/rxvtlib.h.in +++ b/src/rxvtlib.h.in @@ -252,6 +252,10 @@ struct rxvt_vars { XSizeHints szHint; rxvt_display *display; rxvt_color *PixColors; + rxvt_color *PixColorsFocused; +#ifdef OFF_FOCUS_FADING + rxvt_color *PixColorsUnFocused; +#endif short numPixColors; Cursor TermWin_cursor; /* cursor for vt window */ int sb_shadow; /* scrollbar shadow width */
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 12:09:20 2024