[gtk+/gtk-style-context: 118/490] GtkWidget: Set screen info in GtkStyleContext.



commit a149411c021d68e1e215255b952b906e10f83741
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Jul 3 13:20:45 2010 +0200

    GtkWidget: Set screen info in GtkStyleContext.

 gtk/gtkwidget.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 549ac83..c365a9a 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7324,6 +7324,9 @@ gtk_widget_set_parent (GtkWidget *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));
     }
 }
 
@@ -7925,6 +7928,8 @@ do_screen_change (GtkWidget *widget,
 {
   if (old_screen != new_screen)
     {
+      GtkStyleContext *context;
+
       if (old_screen)
 	{
 	  PangoContext *context = g_object_get_qdata (G_OBJECT (widget), quark_pango_context);
@@ -7933,6 +7938,10 @@ do_screen_change (GtkWidget *widget,
 	}
 
       _gtk_tooltip_hide (widget);
+
+      context = gtk_widget_get_style_context (widget);
+      gtk_style_context_set_screen (context, new_screen);
+
       g_signal_emit (widget, widget_signals[SCREEN_CHANGED], 0, old_screen);
     }
 }
@@ -13313,6 +13322,9 @@ gtk_widget_get_style_context (GtkWidget *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));
         }
     }
 



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