From 5e2bad6411be6e728ad746cce94b37f5ad5e745a Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Sun, 21 Apr 2002 18:07:28 +0000 Subject: [PATCH] Sun Apr 21 14:06:19 2002 Michael Jennings (mej) A patch from Charles Clancy to fix shading on Solaris. SVN revision: 6159 --- ChangeLog | 5 +++++ src/pixmap.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d295fa..c9e28a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4567,3 +4567,8 @@ Also removed '~' from the CUTCHARS compiled-in default. (It had already been removed from the themes.) Makes double-click selection of URL's easier. Requested by Laurence J. Lane . ---------------------------------------------------------------------- +Sun Apr 21 14:06:19 2002 Michael Jennings (mej) + +A patch from Charles Clancy to fix shading on +Solaris. +---------------------------------------------------------------------- diff --git a/src/pixmap.c b/src/pixmap.c index 8ad4d07..e47438b 100644 --- a/src/pixmap.c +++ b/src/pixmap.c @@ -1775,11 +1775,12 @@ colormod_trans(Pixmap p, imlib_t *iml, GC gc, unsigned short w, unsigned short h #endif break; case 24: - /* FIXME: Is this test needed? */ - if (1 || (ximg->bits_per_pixel != 32)) { - shade_ximage_24(ximg->data, ximg->bytes_per_line, w, h, rm, gm, bm); - break; - } + if (ximg->bits_per_pixel != 32) { + shade_ximage_24(ximg->data, ximg->bytes_per_line, w, h, rm, gm, bm); + } else { + shade_ximage_24(ximg->data, ximg->bytes_per_line, w * 4 / 3, h, rm, gm, bm); + } + break; case 32: #ifdef HAVE_MMX shade_ximage_32_mmx(ximg->data, ximg->bytes_per_line, w, h, rm, gm, bm);