summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2011-03-21 18:49:55 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2011-03-21 18:51:14 -0400
commit82db52aaf4bb6a1d58b68724a2ae235c22b6e853 (patch)
treeb6bb810f2c6739bb7b37f5001e11da6f103d988a
parent654d966e6ce95b376101dac2889e207da8de4016 (diff)
downloadmutter-82db52aaf4bb6a1d58b68724a2ae235c22b6e853.tar.gz
iconcache: don't crash on a non-alpha mask pixmap
We assume when applying a mask that it is a depth-1 pixmap that cairo interprets as alpha. So ignore a non-depth-1 mask. https://bugzilla.gnome.org/show_bug.cgi?id=641975
-rw-r--r--src/core/iconcache.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/iconcache.c b/src/core/iconcache.c
index d29846720..cb3924b16 100644
--- a/src/core/iconcache.c
+++ b/src/core/iconcache.c
@@ -434,10 +434,11 @@ try_pixmap_and_mask (MetaDisplay *display,
if (unscaled && src_mask != None)
{
- get_pixmap_geometry (display, src_mask, &w, &h, NULL);
- mask = meta_gdk_pixbuf_get_from_pixmap (src_mask,
- 0, 0,
- w, h);
+ get_pixmap_geometry (display, src_mask, &w, &h, &d);
+ if (d == 1)
+ mask = meta_gdk_pixbuf_get_from_pixmap (src_mask,
+ 0, 0,
+ w, h);
}
meta_error_trap_pop (display);