[metacity/gnome-3-18] iconcache: don't crash on a non-alpha mask pixmap
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/gnome-3-18] iconcache: don't crash on a non-alpha mask pixmap
- Date: Mon, 23 May 2016 20:34:49 +0000 (UTC)
commit 06a2ea4c32375ff2956a6fcce765c6d912cc1b34
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Mar 21 18:49:55 2011 -0400
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
src/core/iconcache.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/core/iconcache.c b/src/core/iconcache.c
index 4647ca8..8c5b9ca 100644
--- a/src/core/iconcache.c
+++ b/src/core/iconcache.c
@@ -432,10 +432,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, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]