summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-bg-crossfade.c
diff options
context:
space:
mode:
authorDenis Gorodnichev <[email protected]>2014-02-27 17:16:51 +0400
committerDenis Gorodnichev <[email protected]>2014-02-27 17:16:51 +0400
commite95d24559060365eb4fee8154ad82434bf3c8a0a (patch)
tree1c62646abdff4ae1c191fc4f4f86cfb3933c1ad5 /libmate-desktop/mate-bg-crossfade.c
parent0e7cc64581b44f4f80fa392ee9bff0a139f06785 (diff)
downloadmate-desktop-e95d24559060365eb4fee8154ad82434bf3c8a0a.tar.bz2
mate-desktop-e95d24559060365eb4fee8154ad82434bf3c8a0a.tar.xz
gtk3: GdkRGBA support
Diffstat (limited to 'libmate-desktop/mate-bg-crossfade.c')
-rw-r--r--libmate-desktop/mate-bg-crossfade.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libmate-desktop/mate-bg-crossfade.c b/libmate-desktop/mate-bg-crossfade.c
index 3242004..716c782 100644
--- a/libmate-desktop/mate-bg-crossfade.c
+++ b/libmate-desktop/mate-bg-crossfade.c
@@ -277,9 +277,19 @@ tile_surface (cairo_surface_t *surface,
}
else
{
+#if GTK_CHECK_VERSION(3, 0, 0)
+ GtkStyleContext *style_context;
+ style_context = gtk_style_context_new();
+ GdkRGBA color;
+ gtk_style_context_get(style_context, GTK_STATE_FLAG_NORMAL,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &color,
+ NULL);
+ gdk_cairo_set_source_rgba(cr, &color);
+#else
GtkStyle *style;
style = gtk_widget_get_default_style ();
gdk_cairo_set_source_color(cr, &style->bg[GTK_STATE_NORMAL]);
+#endif
}
cairo_paint (cr);