]> Pileus Git - ~andy/gtk/commitdiff
Check that the pixmap has the right depth. (#333363, Ed Catmur)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Mar 2006 17:17:50 +0000 (17:17 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 6 Mar 2006 17:17:50 +0000 (17:17 +0000)
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)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkpixmap.c

index d548edd7d59eeae53f2d8e134a7f984c3a35bb7c..6c353622d54959dc4355d1d9a4c89eb169b4e32c 100644 (file)
--- 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
index d548edd7d59eeae53f2d8e134a7f984c3a35bb7c..6c353622d54959dc4355d1d9a4c89eb169b4e32c 100644 (file)
@@ -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
index d2834bf2094f727870664cc9209524f663405fe1..e9680d2eb37912678c10bfcf1a780d694e13a8fc 100644 (file)
@@ -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);