summaryrefslogtreecommitdiff
path: root/gdk/gdkdraw.c
diff options
context:
space:
mode:
authorRon Steinke <rsteinke@src.gnome.org>2001-07-23 21:28:38 +0000
committerRon Steinke <rsteinke@src.gnome.org>2001-07-23 21:28:38 +0000
commit9cfd92ef66b4c3661cd9dee8d6f91de8a1ef7a17 (patch)
treefea195cb232164439b1db9d1b96d2c491ff7a55f /gdk/gdkdraw.c
parent5f50d1fd7297e1851630c7e53d60b997a5b95125 (diff)
downloadgdk-pixbuf-9cfd92ef66b4c3661cd9dee8d6f91de8a1ef7a17.tar.gz
Added a check on the colormap depth to gdk_drawable_set_colormap()
* gdk/gdkdraw.c: Added a check on the colormap depth to gdk_drawable_set_colormap() * gdk/x11/gdkimage-x11.c: combination of Mathias Hasselmann's patch to fix colorsel and my patch to fix gdk_drawable_get_image() for pixmaps without visuals (more specifically, bitmaps) * gdk/x11/gdkpixmap-x11.c: Fixed gdk_pixmap_new() so it doesn't set a colormap with the wrong depth
Diffstat (limited to 'gdk/gdkdraw.c')
-rw-r--r--gdk/gdkdraw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index d05bb1b7f..b4de48a2f 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -198,6 +198,8 @@ gdk_drawable_set_colormap (GdkDrawable *drawable,
GdkColormap *cmap)
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
+ g_return_if_fail (cmap == NULL || gdk_drawable_get_depth (drawable)
+ == cmap->visual->depth);
GDK_DRAWABLE_GET_CLASS (drawable)->set_colormap (drawable, cmap);
}