diff --git a/openbox-3.4.7.2-24bit.patch b/openbox-3.4.7.2-24bit.patch new file mode 100644 index 0000000..5092b8d --- /dev/null +++ b/openbox-3.4.7.2-24bit.patch @@ -0,0 +1,48 @@ +commit 263833450d3fb1ca0bfffef302c4b204a3133766 +Author: Mikael Magnusson +Date: Sat Jun 6 11:12:06 2009 +0200 + + Add support for 24bit + +diff --git a/render/color.c b/render/color.c +index 41fcc71..5e3f216 100644 +--- a/render/color.c ++++ b/render/color.c +@@ -143,6 +143,28 @@ void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im) + } + } else im->data = (gchar*) data; + break; ++ case 24: ++ { ++ /* reverse the ordering, shifting left 16bit should be the first byte ++ out of three, etc */ ++ const guint roff = (16 - RrRedOffset(inst)) / 8; ++ const guint goff = (16 - RrGreenOffset(inst)) / 8; ++ const guint boff = (16 - RrBlueOffset(inst)) / 8; ++ gint outx; ++ for (y = 0; y < im->height; y++) { ++ for (x = 0, outx = 0; x < im->width; x++, outx += 3) { ++ r = (data[x] >> RrDefaultRedOffset) & 0xFF; ++ g = (data[x] >> RrDefaultGreenOffset) & 0xFF; ++ b = (data[x] >> RrDefaultBlueOffset) & 0xFF; ++ p8[outx+roff] = r; ++ p8[outx+goff] = g; ++ p8[outx+boff] = b; ++ } ++ data += im->width; ++ p8 += im->bytes_per_line; ++ } ++ break; ++ } + case 16: + for (y = 0; y < im->height; y++) { + for (x = 0; x < im->width; x++) { +@@ -191,7 +213,7 @@ void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im) + } + break; + default: +- g_error("Your bit depth is currently unhandled\n"); ++ g_error("This image bit depth (%i) is currently unhandled", im->bits_per_pixel); + + } + } diff --git a/openbox.spec b/openbox.spec index 9ca523c..eeb3a4a 100644 --- a/openbox.spec +++ b/openbox.spec @@ -1,6 +1,6 @@ Name: openbox Version: 3.4.7.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A highly configurable and standards-compliant X11 window manager Group: User Interface/Desktops @@ -16,6 +16,7 @@ Patch0: openbox-3.4.7.1-autostartdir.patch Patch1: openbox-3.4.7.2-gdm.patch Patch2: openbox-3.4.7.2-gnomesession.patch Patch3: openbox-3.4.7.2-autostartid.patch +Patch4: openbox-3.4.7.2-24bit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -76,6 +77,7 @@ The %{name}-libs package contains shared libraries used by %{name}. %patch1 -p1 -b .gdm %patch2 -p1 -b .gnomesession %patch3 -p1 -b .autostartid +%patch4 -p1 -b .24bit %build @@ -146,6 +148,10 @@ rm -rf %{buildroot} %changelog +* Tue Sep 22 2009 Miroslav Lichvar - 3.4.7.2-11 +- Add support for 24-bit images (#524708) +- Update setlayout.c + * Sat Jul 25 2009 Fedora Release Engineering - 3.4.7.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 7bb602a..a2029fe 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -76f263e1550532ae54fd53c3a49b2c71 setlayout.c 9e7589e90519bc6ac2f4656ea6869439 openbox-3.4.7.2.tar.gz +16ca0d290cae2f4c16a35e9cdfb6f503 setlayout.c