From 6289e8a1066720927512a7ea755a87cb0c6e8faa Mon Sep 17 00:00:00 2001 From: ayin Date: Fri, 3 Aug 2007 23:32:14 +0000 Subject: [PATCH] Remove --enable-tinting and make --enable-transparency enable also the tinting code. --- configure.ac | 12 ------------ doc/rxvt.7.pod | 4 ---- src/command.C | 2 +- src/init.C | 2 +- src/rsinc.h | 4 +--- src/rxvt.h | 2 +- src/xdefaults.C | 10 ++-------- src/xpm.C | 10 +--------- 8 files changed, 7 insertions(+), 39 deletions(-) diff --git a/configure.ac b/configure.ac index 3b64ab09..8d18ffd8 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod index 79b6da95..bc2e9a5b 100644 --- a/doc/rxvt.7.pod +++ b/doc/rxvt.7.pod @@ -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. diff --git a/src/command.C b/src/command.C index 9d5f5262..4aeb4da4 100644 --- a/src/command.C +++ b/src/command.C @@ -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); diff --git a/src/init.C b/src/init.C index 69c47ad9..e5d4516a 100644 --- a/src/init.C +++ b/src/init.C @@ -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 diff --git a/src/rsinc.h b/src/rsinc.h index c997ddb2..75692f1a 100644 --- a/src/rsinc.h +++ b/src/rsinc.h @@ -62,6 +62,7 @@ #endif #ifdef ENABLE_TRANSPARENCY def (transparent) + def (shade) #endif #if XFT def (depth) @@ -102,9 +103,6 @@ #ifdef OFF_FOCUS_FADING def (fade) #endif -#ifdef TINTING - def (shade) -#endif #if ENABLE_PERL def (perl_eval) def (perl_ext_1) diff --git a/src/rxvt.h b/src/rxvt.h index caa1a8f1..26dd3238 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -591,7 +591,7 @@ enum colour_list { Color_scroll, Color_trough, #endif -#if TINTING +#if ENABLE_TRANSPARENCY Color_tint, #endif #if OFF_FOCUS_FADING diff --git a/src/xdefaults.C b/src/xdefaults.C index 2e39fbeb..3dcf10c8 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -112,16 +112,12 @@ 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 @@ -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 diff --git a/src/xpm.C b/src/xpm.C index 0072f463..9fb9733d 100644 --- 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; -- 2.34.1