Fix mishandling of 32-bit visuals. From Ubuntu. (LP: #70367)

https://bugs.launchpad.net/ubuntu/+source/imlib/+bug/70367

This fixes at least graphics/qiv with a -current X.org.

testing & ok brad@
This commit is contained in:
bernd 2007-12-19 21:30:53 +00:00
parent b4e9976706
commit 9cdab3ea1c
3 changed files with 56 additions and 2 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.55 2007/09/15 20:09:41 simon Exp $
# $OpenBSD: Makefile,v 1.56 2007/12/19 21:30:53 bernd Exp $
# $FreeBSD: Makefile,v 1.45 1999/03/09 01:08:57 nectar Exp $
COMMENT= image manipulation library for X11
V= 1.9.14
DISTNAME= imlib-${V}
PKGNAME= imlib-${V}p5
PKGNAME= imlib-${V}p6
SHARED_LIBS= Imlib 19.14 \
gdk_imlib 19.14
CATEGORIES= graphics devel

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-Imlib_misc_c,v 1.1 2007/12/19 21:30:53 bernd Exp $
Include patch (max24bpp.patch) to fix mishandling of 32-bit
visuals (LP: #70367)
https://bugs.launchpad.net/ubuntu/+source/imlib/+bug/70367
--- Imlib/misc.c.orig Mon Dec 17 22:16:57 2007
+++ Imlib/misc.c Mon Dec 17 22:17:41 2007
@@ -423,6 +423,8 @@ Imlib_init(Display * disp)
if (xvir[i].depth > max)
max = xvir[i].depth;
}
+ if (max > 24)
+ max = 24;
if (max > 8)
{
id->x.depth = max;
@@ -1023,6 +1025,8 @@ Imlib_init_with_params(Display * disp, ImlibInitParams
if (xvir[i].depth > max)
max = xvir[i].depth;
}
+ if (max > 24)
+ max = 24;
if (max > 8)
{
id->x.depth = max;

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-gdk_imlib_misc_c,v 1.1 2007/12/19 21:30:53 bernd Exp $
Include patch (max24bpp.patch) to fix mishandling of 32-bit
visuals (LP: #70367)
https://bugs.launchpad.net/ubuntu/+source/imlib/+bug/70367
--- gdk_imlib/misc.c.orig Mon Dec 17 22:15:38 2007
+++ gdk_imlib/misc.c Mon Dec 17 22:16:38 2007
@@ -455,6 +455,8 @@ gdk_imlib_init()
if (xvir[i].depth > max)
max = xvir[i].depth;
}
+ if (max > 24)
+ max = 24;
if (max > 8)
{
id->x.depth = max;
@@ -1004,6 +1006,8 @@ gdk_imlib_init_params(GdkImlibInitParams * p)
if (xvir[i].depth > max)
max = xvir[i].depth;
}
+ if (max > 24)
+ max = 24;
if (max > 8)
{
id->x.depth = max;