From 4e175a064892935edef8a5bc90d7d4124f1a1ca0 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 30 Oct 2009 19:19:58 +0000 Subject: [PATCH] Fix xcowsay on screens with depth != 24 --- config.h.in | 3 +++ src/bubblegen.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.h.in b/config.h.in index aa22417..943163d 100644 --- a/config.h.in +++ b/config.h.in @@ -77,6 +77,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/src/bubblegen.c b/src/bubblegen.c index 7c2f855..3cd0eab 100644 --- a/src/bubblegen.c +++ b/src/bubblegen.c @@ -62,8 +62,11 @@ static void bubble_init(bubble_t *b, bubble_style_t style) GdkColor black, white, bright_green; 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(); -- 2.39.2