-- 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:

git.thebackupbox.net

rxvt-unicode-sixel

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

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

index d2409c91fb648f9b468f40ab22a1ca5e6c7172e5..

index ..16568c2c08e62d46d3e9eea5900527960b390f23 100644

--- 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

index 3dc48fe5b39cfaa81c03e7b841becd6e3901fc41..

index ..51321cefc31c4952db7edd0e46adc919074339e9 100644

--- 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

index 98f15cc1318152962a78d58158c4a9be27a5c6ef..

index ..b0bb2306b941d9f44c6f367c09ce56fba9a43c6e 100644

--- 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

index fd43fc8f4f37580958211cb531c50d7a49169fbc..

index ..9c84b111f2b1000cc1628decd1a7b0f18c240386 100644

--- 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

index 49661a233434b003ac3762230a0df292e24ededc..

index ..8a987330064de9cbca157c228d99c024043b532a 100644

--- 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

index 7be59ede5c6630dea79b11945b6f384ac58a3713..

index ..405cfc465ef405228b5c5f15a21fdb9cc389596e 100644

--- 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

index 957cc7d64a7fff427032fafd2e2187b33142c8e6..

index ..b4d860db18d69e9636da411d3a330bee23de3050 100755

--- 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

index a52028f229a0eebce119bab166fc6b6790b0f16a..

index ..b5df58d11da18d49b63cdb20b96e9921769b7637 100644

--- 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

index dfa3e876c1b9329e38426d460c730de778b4b274..

index ..840057153b9d26aadaa05e17f5dba4c000a29f6f 100644

--- 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

index 1adedfb41dbd296523940866d93f947121fb3624..

index ..9edac7db8ac9b8a06cb3d9d0397da6e293d30b3b 100644

--- 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

index f390e217785316ee947a6fb55b43703f97f85f23..

index ..1fd0a367465d07113ebb3b0056cec6620bba42b3 100644

--- 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