GtkWidget: Ensure the style context always has an screen.

Things like font settings depend on the screen, and widgets
like GtkTextView trigger queries on widgets without screen
when the parent window is being destroyed.
This commit is contained in:
Carlos Garnacho 2010-11-09 18:28:38 +01:00
parent 48f239c1f2
commit 1cfeeadc70

View File

@ -8388,7 +8388,7 @@ do_screen_change (GtkWidget *widget,
_gtk_tooltip_hide (widget);
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_screen (context, new_screen);
gtk_style_context_set_screen (context, gtk_widget_get_screen (widget));
g_signal_emit (widget, widget_signals[SCREEN_CHANGED], 0, old_screen);
}