summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-03-06 17:17:50 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-03-06 17:17:50 +0000
commita319bd94def8080e1c411d6216cea5f5b4a3072e (patch)
treec59731abfee23eba57e112cb9390d42552c5b148
parent727b00ff13335ba44011a0dd2089c30d702ebdfb (diff)
downloadgtk+-a319bd94def8080e1c411d6216cea5f5b4a3072e.tar.gz
Check that the pixmap has the right depth. (#333363, Ed Catmur)
2006-03-06 Matthias Clasen <mclasen@redhat.com> * gtk/gtkpixmap.c (gtk_pixmap_set): Check that the pixmap has the right depth. (#333363, Ed Catmur)
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--gtk/gtkpixmap.c3
3 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d548edd7d5..6c353622d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-06 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Check that the pixmap
+ has the right depth. (#333363, Ed Catmur)
+
2006-03-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (adjust_wrap_width): Apply some
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index d548edd7d5..6c353622d5 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+2006-03-06 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Check that the pixmap
+ has the right depth. (#333363, Ed Catmur)
+
2006-03-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (adjust_wrap_width): Apply some
diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c
index d2834bf209..e9680d2eb3 100644
--- a/gtk/gtkpixmap.c
+++ b/gtk/gtkpixmap.c
@@ -131,6 +131,7 @@ gtk_pixmap_set (GtkPixmap *pixmap,
gint oldheight;
g_return_if_fail (GTK_IS_PIXMAP (pixmap));
+ g_return_if_fail (gdk_colormap_get_visual (gtk_widget_get_colormap (GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth (GDK_DRAWABLE (val)));
if (pixmap->pixmap != val)
{
@@ -275,7 +276,7 @@ build_insensitive_pixmap (GtkPixmap *gtkpixmap)
pixbuf = gdk_pixbuf_get_from_drawable (NULL,
pixmap,
- gtk_widget_get_colormap (GTK_WIDGET(gtkpixmap)),
+ gtk_widget_get_colormap (GTK_WIDGET (gtkpixmap)),
0, 0,
0, 0,
w, h);