Remove --enable-tinting and make --enable-transparency enable also the tinting
authorayin <ayin>
Fri, 3 Aug 2007 23:32:14 +0000 (23:32 +0000)
committerayin <ayin>
Fri, 3 Aug 2007 23:32:14 +0000 (23:32 +0000)
code.

configure.ac
doc/rxvt.7.pod
src/command.C
src/init.C
src/rsinc.h
src/rxvt.h
src/xdefaults.C
src/xpm.C

index 3b64ab0..8d18ffd 100644 (file)
@@ -97,7 +97,6 @@ dnl AC_PROG_LIBTOOL()dnl#             libtool
 
 support_frills=yes
 support_inheritpixmap=yes
-support_tinting=yes
 support_fading=yes
 support_keepscrolling=yes
 support_selectionscrolling=yes
@@ -139,7 +138,6 @@ AC_ARG_ENABLE(everything,
     if test x$enableval = xno; then
        support_frills=no
        support_inheritpixmap=no
-       support_tinting=no
        support_fading=no
        support_keepscrolling=no
        support_selectionscrolling=no
@@ -169,7 +167,6 @@ AC_ARG_ENABLE(everything,
     if test x$enableval = xyes; then
        support_frills=yes
        support_inheritpixmap=yes
-       support_tinting=yes
        support_fading=yes
        support_keepscrolling=yes
        support_selectionscrolling=yes
@@ -246,12 +243,6 @@ AC_ARG_ENABLE(transparency,
     support_inheritpixmap=$enableval
   fi])
 
-AC_ARG_ENABLE(tinting,
-  [  --enable-tinting        enable tinting of transparent bg],
-  [if test x$enableval = xyes -o x$enableval = xno; then
-    support_tinting=$enableval
-  fi])
-
 AC_ARG_ENABLE(fading,
   [  --enable-fading         enable colors fading when off focus],
   [if test x$enableval = xyes -o x$enableval = xno; then
@@ -765,9 +756,6 @@ 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
 if test x$support_inheritpixmap = xyes; then
   AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background)
 fi
index 79b6da9..bc2e9a5 100644 (file)
@@ -2351,10 +2351,6 @@ transparency to the term.
 
 Add support for fading the text when focus is lost.
 
-=item --enable-tinting (default: on)
-
-Add support for tinting of transparent backgrounds (requires C<--enable-transparency>).
-
 =item --enable-rxvt-scroll (default: on)
 
 Add support for the original rxvt scrollbar.
index 9d5f526..4aeb4da 100644 (file)
@@ -3434,7 +3434,7 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp)
         process_color_seq (op, Color_IT, str, resp);
         break;
 #endif
-#if ENABLE_TRANSPARENCY && TINTING
+#if ENABLE_TRANSPARENCY
       case URxvt_Color_tint:
         process_color_seq (op, Color_tint, str, resp);
 
index 69c47ad..e5d4516 100644 (file)
@@ -168,7 +168,7 @@ const char *const def_colorName[] =
     COLOR_SCROLLBAR,
     COLOR_SCROLLTROUGH,
 #endif                          /* KEEP_SCROLLCOLOR */
-#if TINTING
+#if ENABLE_TRANSPARENCY
     NULL,
 #endif
 #if OFF_FOCUS_FADING
index c997ddb..75692f1 100644 (file)
@@ -62,6 +62,7 @@
 #endif
 #ifdef ENABLE_TRANSPARENCY
   def (transparent)
+  def (shade)
 #endif
 #if XFT
   def (depth)
 #ifdef OFF_FOCUS_FADING
   def (fade)
 #endif
-#ifdef TINTING
-  def (shade)
-#endif
 #if ENABLE_PERL
   def (perl_eval)
   def (perl_ext_1)
index caa1a8f..26dd323 100644 (file)
@@ -591,7 +591,7 @@ enum colour_list {
   Color_scroll,
   Color_trough,
 #endif
-#if TINTING
+#if ENABLE_TRANSPARENCY
   Color_tint,
 #endif
 #if OFF_FOCUS_FADING
index 2e39fbe..3dcf10c 100644 (file)
@@ -112,17 +112,13 @@ optList[] = {
 #if ENABLE_TRANSPARENCY
               BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"),
               SWCH ("tr", Opt_transparent, 0, NULL),
-# if TINTING
               STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"),
-# endif
+              STRG (Rs_shade, "shading", "sh", "%", "shade background by x %."),
 #endif
 #if OFF_FOCUS_FADING
               STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"),
               STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"),
 #endif
-#if TINTING
-              STRG (Rs_shade, "shading", "sh", "%", "shade background by x % when tinting."),
-#endif
               BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"),
 #ifndef NO_BELL
 # if ENABLE_FRILLS
@@ -329,13 +325,11 @@ static const char optionsstring[] = "options: "
 #endif
 #if defined(ENABLE_TRANSPARENCY)
                                     "transparent,"
+                                    "tint,"
 #endif
 #if HAVE_AFTERIMAGE
                                     "afterimage,"
 #endif
-#if TINTING
-                                    "tint,"
-#endif
 #if defined(USE_XIM)
                                     "XIM,"
 #endif
index 0072f46..9fb9733 100644 (file)
--- a/src/xpm.C
+++ b/src/xpm.C
@@ -330,7 +330,7 @@ rxvt_term::set_bgPixmap (const char *file)
 #endif                         /* HAVE_BG_PIXMAP */
 
 #ifdef ENABLE_TRANSPARENCY
-#if TINTING && !defined(HAVE_AFTERIMAGE)
+#ifndef HAVE_AFTERIMAGE
 /* taken from aterm-0.4.2 */
 
 typedef uint32_t RUINT32T;
@@ -648,13 +648,11 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
 
   /* TODO: the below logic needs to be cleaned up */
   if (!i || prop == NULL
-#if TINTING
       || (!ISSET_PIXCOLOR (Color_tint) && rs[Rs_shade] == NULL
 #ifdef HAVE_AFTERIMAGE
           && bgPixmap.original_asim == NULL && rs[Rs_blurradius] == NULL
 #endif
          )
-#endif
       )
     rootpixmap = None;
   else
@@ -684,7 +682,6 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
       while (sx < 0) sx += (int)wrootattr.width;
       while (sy < 0) sy += (int)wrootattr.height;
 
-#if TINTING
       if (rs[Rs_shade])
         shade = atoi (rs[Rs_shade]);
       if (ISSET_PIXCOLOR (Color_tint))
@@ -696,7 +693,6 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
                       && IS_COMPONENT_WHOLESOME(c.b));
       no_tint = (c.r >= 0x00f700 && c.g >= 0x00f700 && c.b >= 0x00f700);
 #undef  IS_COMPONENT_WHOLESOME
-#endif /* TINTING */
       /* theer are no performance advantages to reusing same pixmap */
       if (bgPixmap.pixmap != None)
         XFreePixmap (dpy, bgPixmap.pixmap);
@@ -721,7 +717,6 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
       gc = XCreateGC (dpy, rootpixmap, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcvalue);
       XFillRectangle (dpy, bgPixmap.pixmap, gc, 0, 0, szHint.width, szHint.height);
 
-#if TINTING
       if (whole_tint && !no_tint)
         {
           /* In this case we can tint image server-side getting significant
@@ -733,7 +728,6 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
           XChangeGC (dpy, gc, GCFillStyle | GCForeground | GCFunction, &gcvalue);
           XFillRectangle (dpy, bgPixmap.pixmap, gc, 0, 0, szHint.width, szHint.height);
         }
-#endif
       success = True;
 #ifdef HAVE_AFTERIMAGE
       if (rs[Rs_blurradius] || bgPixmap.original_asim != NULL || (!whole_tint && (!no_tint || shade !=100)))
@@ -838,7 +832,6 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
             success = False;
         }
 #else  /* HAVE_AFTERIMAGE */
-#if TINTING
       if (!whole_tint && (!no_tint || shade !=100))
         {
           XImage *image = XGetImage (dpy, bgPixmap.pixmap, 0, 0, szHint.width, szHint.height, AllPlanes, ZPixmap);
@@ -855,7 +848,6 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
               success = True;
             }
         }
-#endif
 #endif  /* HAVE_AFTERIMAGE */
       PRINT_BACKGROUND_OP_TIME;