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
This commit is contained in:
Havoc Pennington 2002-04-13 20:26:45 +00:00 committed by Havoc Pennington
parent d02060e201
commit 206cff1547
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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;
}