diff options
author | Havoc Pennington <hp@pobox.com> | 2002-04-13 20:26:45 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-04-13 20:26:45 +0000 |
commit | 206cff154788922a0e6017d6f7fcc902b444edfb (patch) | |
tree | a6410143ecf6ecbd2f65cd02f26bf804bc1cded2 | |
parent | d02060e201de567d26b2eda5d019d19d9b19f807 (diff) | |
download | metacity-206cff154788922a0e6017d6f7fcc902b444edfb.tar.gz |
same fix as libwnck, avoid using cmap with the wrong depth
2002-04-13 Havoc Pennington <hp@pobox.com>
* src/ui.c (get_cmap): same fix as libwnck, avoid using cmap
with the wrong depth
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/ui.c | 9 |
2 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2002-04-13 Havoc Pennington <hp@pobox.com> + * src/ui.c (get_cmap): same fix as libwnck, avoid using cmap + with the wrong depth + +2002-04-13 Havoc Pennington <hp@pobox.com> + * src/delete.c: new file containing all the wacky mess I just added to a simple "click the close button", contains all the dealing-with-dead-application cruft. @@ -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; } |