-- 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: f72fd83caa333f72a359b4150f4a480f6cbd3761:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit f72fd83caa333f72a359b4150f4a480f6cbd3761
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Sun Oct 31 08:28:04 2010 +0000

    Disentangle xft and xrender support.

diff --git a/configure.ac b/configure.ac

index 4948b7cee4feed5930e9d3a046326db69e9a3c16..

index ..c9611a7f5590165bf85bf9e941de626557d3ff4a 100644

--- a/configure.ac
+++ b/configure.ac
@@ -651,6 +651,25 @@ if test x$support_xft = xyes; then
     AC_DEFINE(XFT, 1, Define to enable xft support)
   fi
 fi
+if test x$support_inheritpixmap = xyes; then
+  support_xrender=yes
+  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+  if test $PKG_CONFIG != no && $PKG_CONFIG --exists xrender; then
+    X_LIBS="`$PKG_CONFIG xrender --libs` $X_LIBS"
+    CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xrender --cflags`"
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $X_LIBS"
+    AC_CHECK_HEADER(X11/extensions/Xrender.h,,[support_xrender=no])
+    AC_CHECK_FUNC(XRenderFindStandardFormat,,[support_xrender=no])
+    LIBS="$save_LIBS"
+  fi
+
+  if test x$support_xrender = xyes; then
+    LIBS="$LIBS -lm"
+    AC_DEFINE(XRENDER, 1, Define to enable xrender support)
+  fi
+fi
 if test x$support_styles = xyes; then
   AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
 fi
@@ -665,7 +684,6 @@ if test x$support_fading = xyes; then
 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)
-  test x$support_xft = xyes && LIBS="$LIBS -lm"
 fi
 if test x$support_keepscrolling = xno; then
   AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed)
diff --git a/src/background.C b/src/background.C

index 6fb78a632c4ac1eab7113ac8b38f64558ec7e0b4..

index ..03ea52ea807d0a946c39733325dbf9c7720b7eff 100644

--- a/src/background.C
+++ b/src/background.C
@@ -731,7 +731,7 @@ bgPixmap_t::render_image (unsigned long background_flags)
   if (!pixbuf)
     return false;

-#if !XFT
+#if !XRENDER
   if (background_flags)
     return false;
 #endif
@@ -858,7 +858,7 @@ bgPixmap_t::render_image (unsigned long background_flags)
                                                 0, 0);
         }

-#if XFT
+#if XRENDER
       if (background_flags)
         {
           Display *dpy = target->dpy;
@@ -1002,7 +1002,7 @@ bgPixmap_t::set_blur_radius (const char *geom)
   else
     flags |= blurNeeded;

-#if XFT
+#if XRENDER
   XFilters *filters = XRenderQueryFilters (target->dpy, target->display->root);
   if (filters)
     {
@@ -1052,7 +1052,7 @@ compute_tint_shade_flags (rxvt_color *tint, int shade)
         flags |= bgPixmap_t::tintServerSide;
       else
         {
-#if XFT
+#if XRENDER
           flags |= bgPixmap_t::tintServerSide;
 #endif
         }
@@ -1109,7 +1109,7 @@ bgPixmap_t::set_shade (const char *shade_str)
   return false;
 }

-#if XFT
+#if XRENDER
 static void
 get_gaussian_kernel (int radius, int width, double *kernel, XFixed *params)
 {
@@ -1136,7 +1136,7 @@ bool
 bgPixmap_t::blur_pixmap (Pixmap pixmap, Visual *visual, int width, int height)
 {
   bool ret = false;
-#if XFT
+#if XRENDER
   int size = max (h_blurRadius, v_blurRadius) * 2 + 1;
   double *kernel = (double *)malloc (size * sizeof (double));
   XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed));
@@ -1223,7 +1223,7 @@ bgPixmap_t::tint_pixmap (Pixmap pixmap, Visual *visual, int width, int height)
     }
   else
     {
-#  if XFT
+#  if XRENDER
       rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC);

       if (flags & tintSet)
@@ -1444,7 +1444,7 @@ bgPixmap_t::render ()

   if (result)
     {
-#  if !defined(HAVE_AFTERIMAGE) && !XFT
+#  if !defined(HAVE_AFTERIMAGE) && !XRENDER
       /* our own client-side tinting */
       if (!(background_flags & transpPmapTinted) && (flags & tintNeeded))
         {
@@ -1584,7 +1584,7 @@ bgPixmap_t::apply ()

 #endif /* HAVE_BG_PIXMAP */

-#if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) && !XFT
+#if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) && !XRENDER
 /* taken from aterm-0.4.2 */

 static void

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 12:09:53 2024