GNOME Bugzilla – Bug 568365
Styles are colormap specific
Last modified: 2009-01-29 16:55:34 UTC
Here's a patch that fixes problems with GtkStyle handling in the theme code. It comes up in particular when you have a mix of RGB and RGBA windows and use a theme that draws with GTK+ style elements. Symptoms include: * Warnings like: gtk_paint_arrow: asserting `style->depth == gdk_rawable_get_depth (window)' failed * Backgrounds being set to have bad alpha values, causing titles to be draw incorrectly. The patch is messier than it needs to be because I didn't want to break compatibility with libmetacity-private - I could see that causing people who are trying to run the system gnome-appearance-properties with a jhbuild gnome-shell. I didn't investigate what gnome-appearance-properties actually uses from themes.h.
Created attachment 126807 [details] [review] Styles are colormap specific GtkStyle is specific to a particular colormap. Metacity uses different colormaps for windows with different visuals, so it must specialize the GtkStyle. src/ui/frames.[ch]: Keep a GtkStyle for each MetaUIFrame, which is obtained by calling gtk_style_attach() on the style for the MetaFrames. When the style of the MetaFrames changes, reattach everything. When we call gtk_style_set_background() pass in the right style. src/ui/themes.[ch]: Create a _with_style() variant of functions that previously took the style from widget->style passed in, so we can draw with the right style for the colormap.
*** Bug 513944 has been marked as a duplicate of this bug. ***
Looks good to me, and nice that we got bug 513944 out of the way at last! Thanks a whole lot.
*** Bug 561911 has been marked as a duplicate of this bug. ***