After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 568365 - Styles are colormap specific
Styles are colormap specific
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 513944 561911 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-01-19 23:47 UTC by Owen Taylor
Modified: 2009-01-29 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Styles are colormap specific (28.97 KB, patch)
2009-01-19 23:47 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2009-01-19 23:47:03 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.
Comment 1 Owen Taylor 2009-01-19 23:47:44 UTC
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.
Comment 2 Thomas Thurman 2009-01-28 01:42:16 UTC
*** Bug 513944 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Thurman 2009-01-28 01:48:06 UTC
Looks good to me, and nice that we got bug 513944 out of the way at last!  Thanks a whole lot.
Comment 4 Thomas Thurman 2009-01-29 16:55:34 UTC
*** Bug 561911 has been marked as a duplicate of this bug. ***