From 8dfa0e03eac790398e6e05ca99238731fc7a7dea Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 11 Sep 2010 12:45:42 +0200 Subject: [PATCH] GtkWidget: Set style context's screen before the widget_path. This is so the style context has all necessary information before triggering a style change on setting the path. --- gtk/gtkwidget.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 3673fea878..6bc665c17f 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -13402,13 +13402,12 @@ gtk_widget_get_style_context (GtkWidget *widget) gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (settings), GTK_STYLE_PROVIDER_PRIORITY_SETTINGS); + gtk_style_context_set_screen (context, + gtk_widget_get_screen (widget)); path = gtk_widget_get_path (widget); gtk_style_context_set_path (context, path); gtk_widget_path_free (path); - - gtk_style_context_set_screen (context, - gtk_widget_get_screen (widget)); } return context;