Fix bad crash when X bpp != 24, reported by steven@
Diff from upstream.
This commit is contained in:
parent
8ff6c4a593
commit
e830d103ec
@ -1,7 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2009/10/25 11:13:34 landry Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2009/11/03 19:55:57 landry Exp $
|
||||
|
||||
COMMENT = displays a cute cow and message on your desktop
|
||||
DISTNAME = xcowsay-1.1
|
||||
PKGNAME = ${DISTNAME}p0
|
||||
CATEGORIES = games
|
||||
|
||||
HOMEPAGE = http://www.doof.me.uk/xcowsay/
|
||||
|
16
games/xcowsay/patches/patch-src_bubblegen_c
Normal file
16
games/xcowsay/patches/patch-src_bubblegen_c
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-src_bubblegen_c,v 1.1 2009/11/03 19:55:57 landry Exp $
|
||||
Fix crash on non-24 bpp X
|
||||
--- src/bubblegen.c.orig Tue Nov 3 20:50:51 2009
|
||||
+++ src/bubblegen.c Tue Nov 3 20:51:38 2009
|
||||
@@ -63,7 +63,10 @@ static void bubble_init(bubble_t *b, bubble_style_t st
|
||||
GdkColormap *colormap;
|
||||
GdkPoint tip_points[5];
|
||||
|
||||
- b->pixmap = gdk_pixmap_new(NULL, b->width, b->height, 24);
|
||||
+ GdkVisual *root_visual;
|
||||
+ root_visual = gdk_visual_get_system();
|
||||
+ b->pixmap = gdk_pixmap_new(NULL, b->width, b->height, root_visual->depth);
|
||||
+ g_assert(b->pixmap);
|
||||
b->gc = gdk_gc_new(b->pixmap);
|
||||
|
||||
colormap = gdk_colormap_get_system();
|
Loading…
x
Reference in New Issue
Block a user