GNOME Bugzilla – Bug 641975
Pre-_NET_WM_ICONs look corrupted
Last modified: 2011-03-21 23:10:52 UTC
see attached screenshot
Created attachment 180530 [details] screenshot <owen> magcius: the handling for the old pre-net-wm-spec icons seems to be broken
The current release of SDL uses X pixmaps instead of using _NET_WM_ICON. It looks like they've implemented it in a development version, though.
Created attachment 182068 [details] [review] iconcache: Fix apply_mask apply_mask made some wrong assumptions that became untrue after rendering_cleanup landed, such as the number of channels in the pixmap, causing corruption.
Created attachment 182070 [details] [review] iconcache: Fix apply_mask apply_mask made some wrong assumptions that became untrue after rendering_cleanup landed, such as the number of channels in the pixmap, causing corruption. Removed stray debugging code.
Created attachment 184018 [details] [review] Correctly interpret monochrome icons Testing with xeyes, I needed this to get the right results with your patch. Getting the contents of a depth-1 pixmap through cairo gives us an alpha pixmap. We need to convert to a monochrome pixmap as is expected by the ICCCM definition of WM_HINTS.
Created attachment 184019 [details] [review] 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.
Review of attachment 182070 [details] [review]: Mostly looks good, it looks to me like meta_gdk_pixbuf_get_from_pixmap() might return a 3-channel pixmap if given a source pixmap of depth != 1, so we need to validate the depth of the mask. Attached a patch to do that.
Attachment 182070 [details] pushed as 92663c8 - iconcache: Fix apply_mask Attachment 184019 [details] pushed as 82db52a - iconcache: don't crash on a non-alpha mask pixmap
Review of attachment 184018 [details] [review]: Pushed as well
IRC reviewed and pushed