summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2019-08-07 13:03:00 +0200
committerraveit65 <[email protected]>2019-08-11 08:57:24 +0200
commit24ce960a78d5317ac3cd661fb533e208475d2679 (patch)
tree977eddb5055dd427d15ba76a43bc6a894291d0b7
parente8a1ebe5d43b3239ba2d5d9c4ee51692edfbdf79 (diff)
downloadmate-desktop-24ce960a78d5317ac3cd661fb533e208475d2679.tar.bz2
mate-desktop-24ce960a78d5317ac3cd661fb533e208475d2679.tar.xz
Replace deprecated gtk_css_provider_get_default
-rw-r--r--libmate-desktop/mate-bg-crossfade.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libmate-desktop/mate-bg-crossfade.c b/libmate-desktop/mate-bg-crossfade.c
index 3e77e5f..fa083bb 100644
--- a/libmate-desktop/mate-bg-crossfade.c
+++ b/libmate-desktop/mate-bg-crossfade.c
@@ -267,11 +267,16 @@ tile_surface (cairo_surface_t *surface,
}
else
{
+ static GtkCssProvider *provider = NULL;
GtkStyleContext *context;
GdkRGBA bg;
+
+ if (provider == NULL)
+ provider = gtk_css_provider_new ();
+
context = gtk_style_context_new ();
gtk_style_context_add_provider (context,
- GTK_STYLE_PROVIDER (gtk_css_provider_get_default ()),
+ GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_THEME);
gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &bg);
gdk_cairo_set_source_rgba(cr, &bg);