[gtk+] GtkWidget: Set style context's screen before the widget_path.



commit 8dfa0e03eac790398e6e05ca99238731fc7a7dea
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Sep 11 12:45:42 2010 +0200

    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 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3673fea..6bc665c 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]