summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-06-03 03:15:22 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-06-03 03:15:22 +0300
commitfe84e92a2e304f64eb2cd26a968320c54bc30c46 (patch)
treed003777d5297c588ab3deaa046ac4e2ef38fd4e2
parent430f8f962efe2927df2afde5988f5745b278e95f (diff)
downloadmetacity-fe84e92a2e304f64eb2cd26a968320c54bc30c46.tar.gz
libmetacity: don't ignore background and alpha attributes
<frame_style> has background and alpha attributes which is ignored since 78c283c646a69d86d0e708c39fed6dfa131663ab commit.
-rw-r--r--libmetacity/meta-theme-metacity.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/libmetacity/meta-theme-metacity.c b/libmetacity/meta-theme-metacity.c
index 533bd371..b3cc17a5 100644
--- a/libmetacity/meta-theme-metacity.c
+++ b/libmetacity/meta-theme-metacity.c
@@ -5279,6 +5279,7 @@ meta_theme_metacity_draw_frame (MetaThemeImpl *impl,
PangoRectangle extents;
MetaDrawInfo draw_info;
const MetaFrameBorders *borders;
+ GtkStyleContext *context;
/* We opt out of GTK+ HiDPI handling, so we have to do the scaling
* ourselves; the nitty-gritty is a bit confusing, so here is an overview:
@@ -5359,6 +5360,21 @@ meta_theme_metacity_draw_frame (MetaThemeImpl *impl,
cairo_save (cr);
clip_to_rounded_corners (cr, visible_rect, fgeom);
+ context = meta_style_info_get_style (style_info, META_STYLE_ELEMENT_WINDOW);
+
+ if (style->window_background_color != NULL)
+ {
+ GdkRGBA color;
+
+ meta_color_spec_render (style->window_background_color, context, &color);
+
+ if (meta_theme_impl_get_composited (impl))
+ color.alpha = style->window_background_alpha / 255.0;
+
+ gdk_cairo_set_source_rgba (cr, &color);
+ cairo_paint (cr);
+ }
+
/* The enum is in the order the pieces should be rendered. */
i = 0;
while (i < META_FRAME_PIECE_LAST)
@@ -5449,11 +5465,6 @@ meta_theme_metacity_draw_frame (MetaThemeImpl *impl,
if (op_list)
{
- GtkStyleContext *context;
-
- context = meta_style_info_get_style (style_info,
- META_STYLE_ELEMENT_WINDOW);
-
meta_draw_op_list_draw_with_style (op_list, context, cr,
&draw_info, rect);
}
@@ -5491,11 +5502,6 @@ meta_theme_metacity_draw_frame (MetaThemeImpl *impl,
if (gdk_cairo_get_clip_rectangle (cr, NULL))
{
- GtkStyleContext *context;
-
- context = meta_style_info_get_style (style_info,
- META_STYLE_ELEMENT_WINDOW);
-
meta_draw_op_list_draw_with_style (op_list, context, cr,
&draw_info, rect);
}