xutils: Support non-standard depths for icon pixmaps
Currently the presumption is that applications assign a Pixmap for their icon image using the default visual for the screen, or as an A1 bitmap for the icon mask. At least SDL doesn't conform to this rule and always uses 32-bit ARGB Pixmaps. This cases the XCopyArea used by Cairo to grab the image surface from the Pixmap to fail as the source Pixmap and the cairo surface are of different depths and triggers a BadMatch - killing libwnck and its client gnome-shell/gala et al. So as a fallback, if the depth does not match the visual of the root window, we presume that it is in a standard XRenderPictFormat and create a cairo surface of the appropriate depth - instead of crashing, we may just get a weirdly coloured icon. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=736817 Cc: Marco Trevisan (Treviño) <mail@3v1n0.net> Cc: Benjamin Otte <otte@redhat.com>
parent
20b1bfbe
Please register or sign in to comment