GtkWidget: Set screen info in GtkStyleContext.

This commit is contained in:
Carlos Garnacho 2010-07-03 13:20:45 +02:00
parent 758c3e18cc
commit 5db7197c27

View File

@ -7294,6 +7294,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));
}
}
@ -7895,6 +7898,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);
@ -7903,6 +7908,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);
}
}
@ -13283,6 +13292,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));
}
}