Commit 33cd32f7 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

Make gtk_style_new() use a backing GtkStyleContext

Fixes a bug in mutter where it would resort to a dummy style
to get iconview rubberband color.

Reported by Mathieu Bridon in
parent 5b299ce7
...@@ -809,10 +809,24 @@ gtk_style_copy (GtkStyle *style) ...@@ -809,10 +809,24 @@ gtk_style_copy (GtkStyle *style)
GtkStyle* GtkStyle*
gtk_style_new (void) gtk_style_new (void)
{ {
GtkStyleContext *context;
GtkWidgetPath *path;
GtkStyle *style; GtkStyle *style;
style = g_object_new (GTK_TYPE_STYLE, NULL); context = gtk_style_context_new ();
gtk_style_context_set_screen (context, gdk_screen_get_default ());
path = gtk_widget_path_new ();
gtk_widget_path_append_type (path, GTK_TYPE_WIDGET);
gtk_style_context_set_path (context, path);
style = g_object_new (GTK_TYPE_STYLE,
"context", context,
g_object_unref (context);
gtk_widget_path_free (path);
return style; return style;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment