diff --git a/ChangeLog b/ChangeLog index 1115f84f1..e37661e75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-04-13 Havoc Pennington + + * src/ui.c (get_cmap): same fix as libwnck, avoid using cmap + with the wrong depth + 2002-04-13 Havoc Pennington * src/delete.c: new file containing all the diff --git a/src/ui.c b/src/ui.c index 3df901974..5a512ec37 100644 --- a/src/ui.c +++ b/src/ui.c @@ -374,6 +374,15 @@ get_cmap (GdkPixmap *pixmap) } } + /* Be sure we aren't going to blow up due to visual mismatch */ + if (cmap && + (gdk_colormap_get_visual (cmap)->depth != + gdk_drawable_get_depth (pixmap))) + { + cmap = NULL; + meta_verbose ("Switching back to NULL cmap because of depth mismatch\n"); + } + return cmap; }