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



commit a9fc2eb9340bbc28d6e59f43e8ccf6471e3b0c6d
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 6320521..3c77c05 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12752,13 +12752,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]