summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-04-13 20:26:45 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-04-13 20:26:45 +0000
commit206cff154788922a0e6017d6f7fcc902b444edfb (patch)
treea6410143ecf6ecbd2f65cd02f26bf804bc1cded2
parentd02060e201de567d26b2eda5d019d19d9b19f807 (diff)
downloadmetacity-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--ChangeLog5
-rw-r--r--src/ui.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1115f84f..e37661e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/src/ui.c b/src/ui.c
index 3df90197..5a512ec3 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;
}